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
Release 1.0.17
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
OcppError.ts
diff --git
a/src/charging-station/OcppError.ts
b/src/charging-station/OcppError.ts
index d39cdef1c8f5baa039c7941d51cfb724ce8569df..6780b60bcc032bc8f3470069b0150836c4d42dcf 100644
(file)
--- a/
src/charging-station/OcppError.ts
+++ b/
src/charging-station/OcppError.ts
@@
-2,14
+2,14
@@
import { ErrorType } from '../types/ocpp/ErrorType';
export default class OCPPError extends Error {
code: string;
export default class OCPPError extends Error {
code: string;
- details: any;
+ details
?
: any;
constructor(code: string, message: string, details?: any) {
super(message);
constructor(code: string, message: string, details?: any) {
super(message);
- this.code = code
||
ErrorType.GENERIC_ERROR;
- this.message = message
||
'';
- this.details = details
||
{};
+ this.code = code
??
ErrorType.GENERIC_ERROR;
+ this.message = message
??
'';
+ this.details = details
??
{};
Object.setPrototypeOf(this, OCPPError.prototype); // For instanceof
Object.setPrototypeOf(this, OCPPError.prototype); // For instanceof