From 8b81561dd302f23dc2fe5551952e59c9196ad5f0 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 1 Jul 2008 17:50:15 -0400 Subject: [PATCH] ApiException will now string all of its exceptions together to form the message * Api.php: (ApiException::__construct): Add a prefix for the list of errors to be displayed (ApiException::addException): Append the exception's message to ApiException->message --- Api.php | 3 ++- CHANGES | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Api.php b/Api.php index a89747c..ea93263 100644 --- a/Api.php +++ b/Api.php @@ -528,7 +528,7 @@ class ApiException extends Exception */ public function __construct() { - parent::__construct(_('An error occurred while processing the API data.')); + parent::__construct(_('An error occurred while processing the API data. Errors: ')); } /** @@ -539,6 +539,7 @@ class ApiException extends Exception public function addException(Exception $e) { $this->exceptions[] = $e; + $this->message .= ' (' . sizeof($this->exceptions) . ') ' . $e->getMessage(); } /** diff --git a/CHANGES b/CHANGES index de494b6..7493747 100644 --- a/CHANGES +++ b/CHANGES @@ -12,3 +12,4 @@ - New: In the BSTemplate::$preParseHook method, the second parameter will be the BSTemplate object itself - New: Add BSTemplate::$globalVars to be substituted into every template - Change: BSTemplate will better detect parse errors in nested templates in BSTemplate::evaluate() +- Change: ApiException will now report all of its messages in ::getMessage() -- 2.22.5