1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[feature/migrations] Fixing returns of callables and handling data state

Lots of comments and some other miscellaneous fixes.

PHPBB3-9737
This commit is contained in:
Nathan Guse
2013-01-09 14:27:01 -06:00
parent e9bcea5d82
commit e3737978f7
9 changed files with 329 additions and 204 deletions

View File

@@ -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);