Suppress overly verbose error output to users
This commit is contained in:
parent
445b2f20eb
commit
4d31004cf4
4 changed files with 28 additions and 10 deletions
|
@ -23,7 +23,26 @@
|
|||
*/
|
||||
namespace Pterodactyl\Exceptions;
|
||||
|
||||
use Log;
|
||||
|
||||
class DisplayException extends \Exception
|
||||
{
|
||||
|
||||
private $_logging = null;
|
||||
|
||||
public function __construct($message, $log = null)
|
||||
{
|
||||
$this->_logging = $log;
|
||||
if ($this->_logging !== null) {
|
||||
Log::error($log);
|
||||
}
|
||||
|
||||
parent::__construct($message);
|
||||
}
|
||||
|
||||
public function getLogging()
|
||||
{
|
||||
return $this->_logging;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue