Skip to content

Commit

Permalink
Including stack traces when exceptions occur.
Browse files Browse the repository at this point in the history
  • Loading branch information
patricknelson committed Aug 27, 2015
1 parent fa65e51 commit de959cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions code/MigrateTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function run($request) {
DB::getConn()->transactionRollback();
$this->output("ERROR (" . $e->getCode() . "): " . $e->getMessage());
$this->output("\nNote: Any database changes have been rolled back.");
$this->output($e->getTraceAsString());
}

// Revert back to previous error handling.
Expand Down
20 changes: 10 additions & 10 deletions code/MigrationException.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* Setup only to better differentiate between exceptions coming directly from migration validation and any other
* exceptions.
*
* @author Patrick Nelson, [email protected]
* @since 2015-08-21
*/

class MigrationException extends Exception {}
<?php
/**
* Setup only to better differentiate between exceptions coming directly from migration validation and any other
* exceptions.
*
* @author Patrick Nelson, [email protected]
* @since 2015-08-21
*/

class MigrationException extends Exception {}

0 comments on commit de959cb

Please sign in to comment.