mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Suppress overly verbose error output to users
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user