Refactor OCPP requests sending helpers
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 1.6 / OCPP16IncomingRequestService.ts
index d0d7bf09c697b3221133ac4979bab5c8686f50ea..9377c605cb94a966c201361311f5eae4e0394fc5 100644 (file)
@@ -30,7 +30,7 @@ export default class OCPP16IncomingRequestService extends OCPPIncomingRequestSer
 
   public constructor(chargingStation: ChargingStation) {
     if (new.target?.name === 'OCPP16IncomingRequestService') {
-      throw new TypeError('Cannot construct OCPP16IncomingRequestService instances directly');
+      throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
     }
     super(chargingStation);
     this.incomingRequestHandlers = new Map<OCPP16IncomingRequestCommand, IncomingRequestHandler>([