diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-26 16:17:03 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-26 16:17:03 +0400 |
commit | 8aad84b17a3c0b90aa1a4393dae76550be113f59 (patch) | |
tree | be4f3426f77da6e5708ae05c1e8f13ad69f8bd40 /core/ExceptionHandler.php | |
parent | 4157032dbf90ff95fccacffd0ecf9962e47aa6e1 (diff) |
Got tests to pass when running all Core tests.
Diffstat (limited to 'core/ExceptionHandler.php')
-rw-r--r-- | core/ExceptionHandler.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/ExceptionHandler.php b/core/ExceptionHandler.php index cc25f3b989..47cfa12634 100644 --- a/core/ExceptionHandler.php +++ b/core/ExceptionHandler.php @@ -22,6 +22,11 @@ use Piwik\API\ResponseBuilder; */ class ExceptionHandler { + /** + * TODO + */ + public static $debugBacktraceForTests = null; + public static function setUp() { Piwik_AddAction('Log.formatFileMessage', array('\\Piwik\\ExceptionHandler', 'formatFileAndDBLogMessage')); @@ -35,7 +40,7 @@ class ExceptionHandler { if ($message instanceof \Exception) { $message = sprintf("%s(%d): %s\n%s", $message->getFile(), $message->getLine(), $message->getMessage(), - $message->getTraceAsString()); + self::$debugBacktraceForTests ?: $message->getTraceAsString()); $message = $log->formatMessage($level, $pluginName, $datetime, $message); } |