mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Improved error handling and error page
This commit is contained in:
@@ -46,10 +46,10 @@ angular.module('app').config(['$provide','$stateProvider', '$urlRouterProvider',
|
||||
*
|
||||
*/
|
||||
$provide.decorator('$exceptionHandler', ['$delegate', '$injector', function ($delegate, $injector) {
|
||||
return function(exception, cause) {
|
||||
return function(err, cause) {
|
||||
// Go to error state, reload the controller, keep the current URL
|
||||
$injector.get('$state').go('error', { details: exception }, {location:false, reload:true});
|
||||
$delegate(exception, cause);
|
||||
$injector.get('$state').go('error', {type:null, message: err.message, details: err.stack }, {location:false, reload:true});
|
||||
$delegate(err, cause);
|
||||
};
|
||||
}]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user