expo-modules-core
Version:
The core of Expo Modules architecture
17 lines (15 loc) • 569 B
text/typescript
import { CodedError } from './CodedError';
import Platform from '../Platform';
/**
* A class for errors to be thrown when a property is accessed which is
* unavailable, unsupported, or not currently implemented on the running
* platform.
*/
export class UnavailabilityError extends CodedError {
constructor(moduleName: string, propertyName: string) {
super(
'ERR_UNAVAILABLE',
`The method or property ${moduleName}.${propertyName} is not available on ${Platform.OS}, are you sure you've linked all the native dependencies properly?`
);
}
}