aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/exception.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-09 14:27:01 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-01-09 16:44:08 -0600
commite3737978f76a962385a26de910959607d0ae0d30 (patch)
treeb97e686e13305f42d3aa22374321fbad99c1edd2 /phpBB/includes/db/migration/exception.php
parente9bcea5d82fd086ebcf7634ab386623f34ea8d03 (diff)
downloadforums-e3737978f76a962385a26de910959607d0ae0d30.tar
forums-e3737978f76a962385a26de910959607d0ae0d30.tar.gz
forums-e3737978f76a962385a26de910959607d0ae0d30.tar.bz2
forums-e3737978f76a962385a26de910959607d0ae0d30.tar.xz
forums-e3737978f76a962385a26de910959607d0ae0d30.zip
[feature/migrations] Fixing returns of callables and handling data state
Lots of comments and some other miscellaneous fixes. PHPBB3-9737
Diffstat (limited to 'phpBB/includes/db/migration/exception.php')
-rw-r--r--phpBB/includes/db/migration/exception.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/db/migration/exception.php b/phpBB/includes/db/migration/exception.php
index 19fb39ab23..bd46a4e064 100644
--- a/phpBB/includes/db/migration/exception.php
+++ b/phpBB/includes/db/migration/exception.php
@@ -22,8 +22,15 @@ if (!defined('IN_PHPBB'))
*/
class phpbb_db_migration_exception extends \Exception
{
+ /** @var array Extra parameters sent to exception to aid in debugging */
protected $parameters;
+ /**
+ * Throw an exception.
+ *
+ * First argument is the error message.
+ * Additional arguments will be output with the error message.
+ */
public function __construct()
{
$parameters = func_get_args();
@@ -33,6 +40,9 @@ class phpbb_db_migration_exception extends \Exception
$this->parameters = $parameters;
}
+ /**
+ * Output the error as a string
+ */
public function __toString()
{
return $this->message . ': ' . var_export($this->parameters, true);