rxpoweredup
Version:
A Typescript RxJS-based library for controlling LEGO Powered UP hubs & peripherals.
11 lines (10 loc) • 340 B
JavaScript
import { GenericErrorCode, MessageType } from '../constants';
export class GenericError extends Error {
code;
commandType;
constructor(code, commandType) {
super(`Generic error ${GenericErrorCode[code]} for command ${MessageType[commandType]}`);
this.code = code;
this.commandType = commandType;
}
}