UNPKG

389 BJavaScriptView Raw
1/**
2 * A general error class that should be used for all errors in Expo modules.
3 * Guarantees a `code` field that can be used to differentiate between different
4 * types of errors without further subclassing Error.
5 */
6export class CodedError extends Error {
7 constructor(code, message) {
8 super(message);
9 this.code = code;
10 }
11}
12//# sourceMappingURL=CodedError.js.map
\No newline at end of file