@zandor300/jsmodbus
Version:
Implementation for the Serial/TCP Modbus protocol.
22 lines (21 loc) • 550 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInternalException = isInternalException;
const InternalErrorMessagesArray = [
'InvalidStartAddress',
'InvalidQuantity',
'InvalidArraySize',
'InvalidBufferSize',
'InvalidCoilsInput',
'InvalidType_MustBeBufferOrArray',
'InvalidValue'
];
function isInternalException(x) {
if (typeof x !== 'object') {
return false;
}
if (InternalErrorMessagesArray.includes(x.message)) {
return true;
}
return false;
}