diff --git a/library/log4php/LoggerThrowableInformation.php b/library/log4php/LoggerThrowableInformation.php new file mode 100644 --- /dev/null +++ b/library/log4php/LoggerThrowableInformation.php @@ -0,0 +1,68 @@ +throwable = $throwable; + } + + /** + * Return source exception + * + * @return Exception + */ + public function getThrowable() { + return $this->throwable; + } + + /** + * @desc Returns string representation of throwable + * + * @return array + */ + public function getStringRepresentation() { + if (!is_array($this->throwableArray)) { + $renderer = new LoggerRendererException(); + + $this->throwableArray = explode("\n", $renderer->render($this->throwable)); + } + + return $this->throwableArray; + } +}