aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/exception.php
diff options
context:
space:
mode:
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);