From 4a6c3b3e3109e2d57076ad62a4bf9f8118ca2bd7 Mon Sep 17 00:00:00 2001 From: diosmosis Date: Sun, 26 Oct 2014 22:30:14 -0700 Subject: Replace all uses of Piwik_ExitWithMessage (except one) with throwing exceptions & include HtmlMessageException class for exceptions w/ HTML content in their message. --- core/Session.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/Session.php') diff --git a/core/Session.php b/core/Session.php index cb08f0f697..24595cd764 100644 --- a/core/Session.php +++ b/core/Session.php @@ -9,6 +9,7 @@ namespace Piwik; use Exception; +use Piwik\Exceptions\HtmlMessageException; use Piwik\Session\SaveHandler\DbTable; use Zend_Session; @@ -38,6 +39,7 @@ class Session extends Zend_Session * * @param array|bool $options An array of configuration options; the auto-start (bool) setting is ignored * @return void + * @throws Exception if starting a session fails */ public static function start($options = false) { @@ -130,7 +132,7 @@ class Session extends Zend_Session $e->getMessage() ); - Piwik_ExitWithMessage($message, $e->getTraceAsString()); + throw new HtmlMessageException($message, $e->getCode(), $e); } } -- cgit v1.2.3