bit-bin
Version:
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b
46 lines (35 loc) • 1.13 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _defineProperty2() {
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
_defineProperty2 = function () {
return data;
};
return data;
}
function _abstractError() {
const data = _interopRequireDefault(require("./abstract-error"));
_abstractError = function () {
return data;
};
return data;
}
/**
* useful to throw an error from the remote server and print it as is on the client, without any extra data.
* this way, in the future, in case we need to throw an error from the server, we don't need to
* update the client to get the error the way we want it.
*/
class CustomError extends _abstractError().default {
constructor(message) {
super();
(0, _defineProperty2().default)(this, "code", void 0);
(0, _defineProperty2().default)(this, "message", void 0);
this.code = 132;
this.message = message;
}
}
exports.default = CustomError;
;