Report

@param Exception $e
@throws Exception
@returns void
176949
public function report(Exception $e)
    {
        parent::report($e);

        $this->reportResponses = [];

        if ($this->shouldntReport($e)) {
            return $this->reportResponses;
        }

        $reporters = $this->config['reporters'];

        foreach ($reporters as $key => $reporter) {
            $class = !isset($reporter['class']) ? null : $reporter['class'];

            if (
                is_null($class) ||
                !class_exists($class) ||
                !in_array(ReporterInterface::class, class_implements($class))
            ) {
                throw new InvalidArgumentException(
                    sprintf(
                        "%s: %s is not a valid reporter class.",
                        $key,
                        $class
                    )
                );
            }

            $config = isset($reporter['config']) && is_array($reporter['config']) ? $reporter['config'] : [];

            // $this->container->make($class)($config) fails php <= 5.4
            $reporterFactory = $this->container->make($class);
            $reporterInstance = $reporterFactory($config);

            $this->reportResponses[$key] = $reporterInstance->report($e);
        }
    }
289753
public function error(\Exception $e)
    {
        if ($this->beep_on_error === true) {
            \Commando\Util\Terminal::beep();
        }

        if ($this->trap_errors !== true) {
            throw $e;
        }

        $color = new \Colors\Color();
        $error = sprintf('ERROR: %s ', $e->getMessage());
        echo $color($error)->bg('red')->bold()->white() . PHP_EOL;
        exit(1);
    }
988748
public static function writeException($e)
    {
        if ($e instanceof \Exception) {
            $text = sprintf("%s\n[%s]\n%s", $e->getFile() . ':' . $e->getLine(), get_class($e), $e->getMessage());
        } else {
            $text = $e;
        }

        $box = new Box($text, '*');
        $out = Colour::colour($box, [Colour::WHITE, 0], Colour::RED);
        $format = new Format(['indent' => 2]);
        $out = $format->format($out);
        self::writeln($out, STDERR);
    }
1075516
public function report(ServerRequestInterface $request, Throwable $e): void
    {
        call_user_func_array($this->callable, [$request, $e]);
    }
1099826
public function notify(Exception $e)
    {
        $this->exception = $e;
        $this->notifier->send($e);
    }
737008
public static function run( \Exception $e )
	{
		$config = config('system.errors');
		if (($config['display'] || is_a( $e, Message::class )) && !($e instanceof QueryException)) {
			$obj = new Response( self::getErrorObject($e), ($e->getCode() ? $e->getCode() : 500) );
		} else {
			$obj = new Response( $e->getMessage(), 500 );
		}
		if ($config['log']) {
			self::logObject($e);
		}
		self::sendResponse( $obj );
	}
1276555
public function logErrorException(\Exception $e)
    {
        if ($this->getServerContext()->hasLogger(LoggerUtils::SYSTEM)) {
            $this->getServerContext()->getLogger(LoggerUtils::SYSTEM)->error($e->__toString());
        }
    }
1193765
protected function _reportException($exception)
    {
        $msg = '`' . get_class($exception) .'` Code(' . $exception->getCode() . ') with ';
        $message = $exception->getMessage();
        if ($message) {
            $msg .= 'message '. Text::dump($exception->getMessage());
        } else {
            $msg .= 'no message';
        }
        $this->write("{$msg}\n\n");
    }
784080
public function handleException(\Exception $e)
	{
        $environment = $this->core->getCurrentDomain()->environment;
		
		if(isset($this->core->getSettings()->errorhandling->controller->$environment) === true) {
			$controller = FrameworkUtils::stringToClassName($this->core->getSettings()->errorhandling->controller->$environment);

			$pc = new $controller->className($this->core, $this->core->getHttpRequest(), new Route());

			$httpResponse = call_user_func(array($pc, $controller->methodName), $e);
		} else {
			$content = null;

			$httpErrorCode = ($e instanceof HttpException)?$e->getCode():500;
			$exceptionStr = null;

			if($this->core->getSettings()->core->environments->$environment->debug === true) {
				$exceptionStr = "\n<pre>";

				$exceptionStr .= '<b>Uncaught exception' . "\n" . '==================</b>' . "\n";
				$exceptionStr .= 'Type: ' . get_class($e) . "\n";
				$exceptionStr .= 'Message: ' . $e->getMessage() . ' (Code: ' . $e->getCode() . ')' . "\n";
				$exceptionStr .= 'Thrown in: ' . $e->getFile() . ' (Line: ' . $e->getLine() . ")\n\n";

				$exceptionStr .= $e->getTraceAsString();

				$exceptionStr .= '</pre>';
			}

			$errorStr = $httpErrorCode . ' ' . HttpResponse::getHttpStatusString($httpErrorCode);
			$content = "<!doctype html>\n<html>\n<head>\n<title>" . $errorStr . "</title>\n</head>\n<body>\n<h1>" . $errorStr . "</h1>" . $exceptionStr . "\n</body>\n</html>";

			$httpResponse = new HttpResponse($httpErrorCode, $content);
		}

		$httpResponse->send();

		exit;
	}
366643
public function report(Exception $e)
    {
        if ($this->shouldntReport($e)) {
            return;
        }

        try {
            $logger = $this->container->make(LoggerInterface::class);
        } catch (Exception $ex) {
            throw $e;
        }

        $level = $this->getLevel($e);
        $id = $this->container->make(ExceptionIdentifier::class)->identify($e);

        $logger->$level($e, ['identification' => ['id' => $id]]);
    }
1151999
protected function reportException(Exception $e)
    {
        $handler = $this->app->make(ExceptionHandler::class);

        $handler->report($e);
    }
1016695
public function handle(Exception $e)
    {
        $this->exception = $e;
        $this->notify($e);
        return $this->record($e);
    }
1086682
public function handle(\Exception $e)
    {
        //by default set LOGIC ERROR
        $type = \Eden\Core\Exception::LOGIC;
        $level = \Eden\Core\Exception::ERROR;
        $offset = 1;
        $reporter = get_class($e);

        $trace = $e->getTrace();
        $message = $e->getMessage();

        //if the exception is an eden exception
        if ($e instanceof \Eden\Core\Exception) {
            //set type and level from that
            $trace = $e->getRawTrace();

            $type = $e->getType();
            $level = $e->getLevel();
            $offset = $e->getTraceOffset();
            $reporter = $e->getReporter();
        }

        $this->trigger(
            'exception',
            $type,
            $level,
            $reporter,
            $e->getFile(),
            $e->getLine(),
            $message,
            $trace,
            $offset
        );
    }
1184242
public static function display( Exception $e )
	{
		$view	= UI_HTML_Exception_View::render( $e );
		print( self::wrapExceptionView( $view ) );
	}
98751
public function exception($e) {
        $type = "system";
        if (isset($_GET['type'])) {
            $type = $_GET['type'];
        }
        switch ($type) {
        case 'dapi':
        case 'api':
            $this->exception[] = $e;
            break;
        case 'page':
        default:
            require __DIR__ . '/exception.php';
            break;
        }
    }
774613
public function report(Exception $e)
    {
        if ($this->shouldReport($e)) {
            $this->event->fire(new ExceptionEvent($e));
        }
        parent::report($e);
    }
618157
public static function log(\Exception $e)
    {
        if (config('geoip.log-failures.enabled', false)) {
            $path = config('geoip.log-failures.path', storage_path('logs/geoip.log'));

            $log = new Logger('geoip');
            $log->pushHandler(new StreamHandler($path, Logger::ERROR));
            $log->addError($e);
        }
    }