repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: refine charging profiles handling variables namespace
[e-mobility-charging-stations-simulator.git]
/
src
/
exception
/
OCPPError.ts
diff --git
a/src/exception/OCPPError.ts
b/src/exception/OCPPError.ts
index 3b23cc3b0d0c18a650a203042810750bd1e89b22..0c69eb23e31e957cbb2c5458a216867b49f5f9be 100644
(file)
--- a/
src/exception/OCPPError.ts
+++ b/
src/exception/OCPPError.ts
@@
-1,12
+1,13
@@
// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
-import { BaseError } from './
internal
';
+import { BaseError } from './
BaseError
';
import {
ErrorType,
type IncomingRequestCommand,
type JsonType,
type RequestCommand,
} from '../types';
import {
ErrorType,
type IncomingRequestCommand,
type JsonType,
type RequestCommand,
} from '../types';
+import { Constants } from '../utils';
export class OCPPError extends BaseError {
code: ErrorType;
export class OCPPError extends BaseError {
code: ErrorType;
@@
-17,12
+18,12
@@
export class OCPPError extends BaseError {
code: ErrorType,
message: string,
command?: RequestCommand | IncomingRequestCommand,
code: ErrorType,
message: string,
command?: RequestCommand | IncomingRequestCommand,
- details?: JsonType
+ details?: JsonType
,
) {
super(message);
this.code = code ?? ErrorType.GENERIC_ERROR;
this.command = command;
) {
super(message);
this.code = code ?? ErrorType.GENERIC_ERROR;
this.command = command;
- this.details = details ??
{}
;
+ this.details = details ??
Constants.EMPTY_FREEZED_OBJECT
;
}
}
}
}