/**
  * Softens a detailed authentication error with a more vague message when
  * the application is not in debug mode. This is for security reasons.
  */
 public function __construct($message = "", $code = 0, Exception $previous = null)
 {
     $this->softErrors = !Config::get('app.debug', false);
     if ($this->softErrors) {
         $message = $this->errorMessage;
     }
     parent::__construct($message, $code, $previous);
 }
 /**
  * Creates the CMS exception object.
  * @param mixed $message The message to display as a string, or a CmsCompoundObject that is used
  * for using this exception as a mask for another exception type.
  * @param int $code Error code to specify the exception type:
  * Error 100: A general exception.
  * Error 200: Mask the exception as INI content.
  * Error 300: Mask the exception as PHP content.
  * Error 400: Mask the exception as Twig content.
  * @param \Exception $previous Previous exception.
  */
 public function __construct($message = null, $code = 100, Exception $previous = null)
 {
     if ($message instanceof CmsCompoundObject || $message instanceof ComponentPartial) {
         $this->compoundObject = $message;
         $message = '';
     }
     if (isset(static::$errorCodes[$code])) {
         $this->errorType = static::$errorCodes[$code];
     }
     parent::__construct($message, $code, $previous);
 }