UNPKG

@growbox/sensors

Version:

An abstraction layer for a selection of raspberry-compatible sensors

26 lines (21 loc) 602 B
/** * @author nstCactus * @date 11/12/2017 07:12 */ /** * A sensor-related error * @formatter:off * @property {string} message A message describing the error * @property {string} file The file in which the error occurred * @property {number} lineNumber The line (in the `this.file` file) at which the error occurred * @property {*} previous The error that lead to this error * @formatter:on */ class SensorError extends Error { constructor(message, previous) { super(); this.message = message; this.previous = previous; } } module.exports = SensorError;