{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _wrapNativeSuper from \"@babel/runtime/helpers/wrapNativeSuper\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nexport var CodedError = function (_Error) {\n  _inherits(CodedError, _Error);\n\n  var _super = _createSuper(CodedError);\n\n  function CodedError(code, message) {\n    var _this;\n\n    _classCallCheck(this, CodedError);\n\n    _this = _super.call(this, message);\n    _this.code = code;\n    return _this;\n  }\n\n  return CodedError;\n}(_wrapNativeSuper(Error));","map":{"version":3,"sources":["../../src/errors/CodedError.ts"],"names":[],"mappings":";;;;;;;;;;AAKA,WAAa,UAAb;AAAA;;AAAA;;AAIE,sBAAY,IAAZ,EAA0B,OAA1B,EAAyC;AAAA;;AAAA;;AACvC,8BAAM,OAAN;AACA,UAAK,IAAL,GAAY,IAAZ;AAFuC;AAGxC;;AAPH;AAAA,mBAAgC,KAAhC","sourcesContent":["/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class CodedError extends Error {\n  code: string;\n  info?: any;\n\n  constructor(code: string, message: string) {\n    super(message);\n    this.code = code;\n  }\n}\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}