1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-07 23:23:49 +02:00

source style cleanup

This commit is contained in:
Braun Patrik
2016-05-09 17:04:56 +02:00
parent 0f92ad983b
commit ef5758f3c7
60 changed files with 549 additions and 601 deletions

View File

@@ -3,7 +3,7 @@
import {RenderingMWs} from "../middlewares/RenderingMWs";
import {Error, ErrorCodes} from "../../common/entities/Error";
export class ErrorRouter{
export class ErrorRouter {
constructor(private app) {
this.addApiErrorHandler();
@@ -17,13 +17,13 @@ export class ErrorRouter{
};
private addGenericHandler() {
this.app.use((err, req, res, next) => {
this.app.use((err, req, res, next) => {
//Flush out the stack to the console
console.error(err.stack);
next(new Error(ErrorCodes.SERVER_ERROR,"Unknown server side error"));
},
RenderingMWs.renderError
//Flush out the stack to the console
console.error(err.stack);
next(new Error(ErrorCodes.SERVER_ERROR, "Unknown server side error"));
},
RenderingMWs.renderError
);
}