X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FOcppError.ts;h=d39cdef1c8f5baa039c7941d51cfb724ce8569df;hb=df6dddca99d23c0458eb4758f651a3be8e5d2d91;hp=3de71eb539125bc22de51da613948a7ea6b8e444;hpb=7f134acac81b80858d53ce3195e3e4ce3e3eec0f;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/OcppError.ts b/src/charging-station/OcppError.ts index 3de71eb5..d39cdef1 100644 --- a/src/charging-station/OcppError.ts +++ b/src/charging-station/OcppError.ts @@ -1,13 +1,13 @@ -import Constants from '../utils/Constants'; +import { ErrorType } from '../types/ocpp/ErrorType'; export default class OCPPError extends Error { code: string; details: any; - constructor(code: string, message:string , details?) { + constructor(code: string, message: string, details?: any) { super(message); - this.code = code || Constants.OCPP_ERROR_GENERIC_ERROR; + this.code = code || ErrorType.GENERIC_ERROR; this.message = message || ''; this.details = details || {};