1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4  value: true
5});
6exports.UnexpectedError = exports.PluginError = void 0;
7function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
9function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10class UnexpectedError extends Error {
11  constructor(message) {
12    super(`${message}\nPlease report this as an issue on https://github.com/expo/expo-cli/issues`);
13    _defineProperty(this, "name", 'UnexpectedError');
14  }
15}
16exports.UnexpectedError = UnexpectedError;
17/**
18 * Based on `JsonFileError` from `@expo/json-file`
19 */
20class PluginError extends Error {
21  constructor(message, code, cause) {
22    super(cause ? `${message}\n└─ Cause: ${cause.name}: ${cause.message}` : message);
23    this.code = code;
24    this.cause = cause;
25    _defineProperty(this, "name", 'PluginError');
26    _defineProperty(this, "isPluginError", true);
27  }
28}
29exports.PluginError = PluginError;
30//# sourceMappingURL=errors.js.map