AppPlugin: Show exceptions in dev (#26795)

When NODE_ENV is dev, print exceptions that
bubble up from an app plugin to the console and
make developer aware of this instead of only
"404 Error".
This commit is contained in:
Andreas Opferkuch
2020-08-05 15:47:25 +02:00
committed by GitHub
parent 325240fc83
commit d4af373529
2 changed files with 11 additions and 2 deletions

View File

@@ -53,6 +53,11 @@ export class NavModelSrv {
}
}
export function getExceptionNav(error: any): NavModel {
console.error(error);
return getWarningNav('Exception thrown', 'See console for details');
}
export function getNotFoundNav(): NavModel {
return getWarningNav('Page not found', '404 Error');
}