From 5c91e2569cb3a400acd20bf06cc0e609dd63a778 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 8 Jan 2013 22:09:14 -0600 Subject: [feature/migrations] Migrations now somewhat works PHPBB3-9737 --- phpBB/includes/db/migration/exception.php | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 phpBB/includes/db/migration/exception.php (limited to 'phpBB/includes/db/migration/exception.php') diff --git a/phpBB/includes/db/migration/exception.php b/phpBB/includes/db/migration/exception.php new file mode 100644 index 0000000000..19fb39ab23 --- /dev/null +++ b/phpBB/includes/db/migration/exception.php @@ -0,0 +1,40 @@ +parameters = $parameters; + } + + public function __toString() + { + return $this->message . ': ' . var_export($this->parameters, true); + } +} -- cgit v1.2.1 From e3737978f76a962385a26de910959607d0ae0d30 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Wed, 9 Jan 2013 14:27:01 -0600 Subject: [feature/migrations] Fixing returns of callables and handling data state Lots of comments and some other miscellaneous fixes. PHPBB3-9737 --- phpBB/includes/db/migration/exception.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'phpBB/includes/db/migration/exception.php') 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); -- cgit v1.2.1 From dfabdbca508a3fbd60c8df57ea756a974f4f135b Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Tue, 22 Jan 2013 13:19:49 -0600 Subject: [ticket/9737] Fix a few minor things in migrations PHPBB3-9737 --- phpBB/includes/db/migration/exception.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/db/migration/exception.php') diff --git a/phpBB/includes/db/migration/exception.php b/phpBB/includes/db/migration/exception.php index bd46a4e064..ffdcd97780 100644 --- a/phpBB/includes/db/migration/exception.php +++ b/phpBB/includes/db/migration/exception.php @@ -22,7 +22,10 @@ if (!defined('IN_PHPBB')) */ class phpbb_db_migration_exception extends \Exception { - /** @var array Extra parameters sent to exception to aid in debugging */ + /** + * Extra parameters sent to exception to aid in debugging + * @var array + */ protected $parameters; /** @@ -42,6 +45,8 @@ class phpbb_db_migration_exception extends \Exception /** * Output the error as a string + * + * @return string */ public function __toString() { -- cgit v1.2.1