public function testExceptionToString() { $exception = new \Exception("This is a testException"); $string = Tier::getExceptionString($exception); //TODO - some assertions. if (class_exists('\\EngineException', false) === true) { try { $foo = new \NonExistentClass(); } catch (\Throwable $t) { $string = Tier::getExceptionString($exception); } } }
/** * @param \Exception $e * @return int * @return int */ public static function processThrowable(\Throwable $e) { $exceptionString = Tier::getExceptionString($e); $body = new ExceptionHtmlBody($exceptionString, 500); self::sendRawBodyResponse($body); return \Tier\TierApp::PROCESS_END; }