import { SerializeableError } from '../utils/error-handling' ; export enum ApplicationErrorType { None , ProductionMode , NotNgApp , UncaughtException } export interface ApplicationError { errorType : ApplicationErrorType ; error ? : SerializeableError ; details : string ; stackTrace : string ; } export class ApplicationError implements ApplicationError { constructor ( errorType , error ? , details ? , stack ? ) { this . errorType = errorType ; this . error = error ; this . details = details || error ? error . message : null ; this . stackTrace = stack || error ? error . stack : new Error ( ) . stack ; } }