Improved error handling and error page

This commit is contained in:
Colin McLeod
2015-05-03 18:33:13 -07:00
parent 508679c185
commit 44f5409246
9 changed files with 36 additions and 24 deletions

View File

@@ -7,26 +7,27 @@ angular.module('app')
switch ($scope.type) {
case 404:
$rootScope.bodyClass = 'deep-space';
$scope.msgPre = 'Page';
$scope.msgHighlight = $scope.path;
$scope.msgPost = 'Not Found';
$rootScope.bodyClass = 'deep-space';
break;
case 'no-ship':
$rootScope.bodyClass = 'docking-bay';
$scope.msgPre = 'Ship';
$scope.msgHighlight = $p.message;
$scope.msgPost = 'does not exist';
$rootScope.bodyClass = 'docking-bay';
break;
case 'build-fail':
$rootScope.bodyClass = 'ship-explode'; // TODO: create background imag for this
$scope.msgPre = 'Build Failure!';
$scope.image = 'ship-explode';
$rootScope.bodyClass = 'docking-bay';
$scope.details = $p.details;
break;
default:
$rootScope.bodyClass = 'thargoid'; // TODO: create background imag for this
$scope.msgPre = "Uh, this is bad..";
$scope.image = 'thargoid';
$rootScope.bodyClass = null;
$scope.errorMessage = $p.message;
$scope.details = $p.details;
}
}]);