ca4578ebe61ce9ac51df6f7c0094c89a.json 2.17 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.UnavailabilityError=void 0;var _classCallCheck2=_interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));var _possibleConstructorReturn2=_interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));var _getPrototypeOf2=_interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));var _inherits2=_interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));var _Platform=_interopRequireDefault(require(\"../Platform\"));var _CodedError2=require(\"./CodedError\");var UnavailabilityError=function(_CodedError){(0,_inherits2.default)(UnavailabilityError,_CodedError);function UnavailabilityError(moduleName,propertyName){(0,_classCallCheck2.default)(this,UnavailabilityError);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(UnavailabilityError).call(this,'ERR_UNAVAILABLE',\"The method or property \"+moduleName+\".\"+propertyName+\" is not available on \"+_Platform.default.OS+\", are you sure you've linked all the native dependencies properly?\"));}return UnavailabilityError;}(_CodedError2.CodedError);exports.UnavailabilityError=UnavailabilityError;","map":{"version":3,"sources":["../../src/errors/UnavailabilityError.ts"],"names":[],"mappings":"ijBAAA,6DACA,yC,GAOa,CAAA,mB,+EACX,6BAAY,UAAZ,CAAgC,YAAhC,CAAoD,uKAEhD,iBAFgD,2BAGtB,UAHsB,KAGR,YAHQ,yBAG4B,kBAAS,EAHrC,wEAKnD,C,6BANsC,uB","sourcesContent":["import Platform from '../Platform';\nimport { CodedError } from './CodedError';\n\n/**\n * A class for errors to be thrown when a property is accessed which is\n * unavailable, unsupported, or not currently implemented on the running\n * platform.\n */\nexport class UnavailabilityError extends CodedError {\n  constructor(moduleName: string, propertyName: string) {\n    super(\n      'ERR_UNAVAILABLE',\n      `The method or property ${moduleName}.${propertyName} is not available on ${Platform.OS}, are you sure you've linked all the native dependencies properly?`\n    );\n  }\n}\n"],"sourceRoot":""},"metadata":{},"sourceType":"script"}