This commit is contained in:
parent
55470c090d
commit
6947a1adba
1260 changed files with 111297 additions and 0 deletions
27
@capacitor/cli/dist/errors.js
vendored
Normal file
27
@capacitor/cli/dist/errors.js
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isFatal = exports.fatal = exports.FatalException = exports.BaseException = void 0;
|
||||
class BaseException extends Error {
|
||||
constructor(message, code) {
|
||||
super(message);
|
||||
this.message = message;
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
exports.BaseException = BaseException;
|
||||
class FatalException extends BaseException {
|
||||
constructor(message, exitCode = 1) {
|
||||
super(message, 'FATAL');
|
||||
this.message = message;
|
||||
this.exitCode = exitCode;
|
||||
}
|
||||
}
|
||||
exports.FatalException = FatalException;
|
||||
function fatal(message) {
|
||||
throw new FatalException(message);
|
||||
}
|
||||
exports.fatal = fatal;
|
||||
function isFatal(e) {
|
||||
return e && e instanceof FatalException;
|
||||
}
|
||||
exports.isFatal = isFatal;
|
||||
Loading…
Add table
Add a link
Reference in a new issue