1 // Copyright 2022-present 650 Industries. All rights reserved. 2 3 import ABI49_0_0ExpoModulesCore 4 5 internal class PermissionsModuleNotFoundException: Exception { 6 override var reason: String { 7 "Permissions module not found. Are you sure that Expo modules are properly linked?" 8 } 9 } 10 11 internal class FileSystemModuleNotFoundException: Exception { 12 override var reason: String { 13 "FileSystem module not found. Are you sure that Expo modules are properly linked?" 14 } 15 } 16 17 internal class LoggerModuleNotFoundException: Exception { 18 override var reason: String { 19 "Logger module not found. Are you sure that Expo modules are properly linked?" 20 } 21 } 22 23 internal class MissingCameraPermissionException: Exception { 24 override var reason: String { 25 "Missing camera or camera roll permission" 26 } 27 } 28 29 internal class MissingPhotoLibraryPermissionException: Exception { 30 override var reason: String { 31 "Missing photo library permission" 32 } 33 } 34 35 internal class CameraUnavailableOnSimulatorException: Exception { 36 override var reason: String { 37 "Camera not available on simulator" 38 } 39 } 40 41 internal class MultiselectUnavailableException: Exception { 42 override var reason: String { 43 "Multiple selection is only available on iOS 14+" 44 } 45 } 46 47 internal class MissingCurrentViewControllerException: Exception { 48 override var reason: String { 49 "Cannot determine currently presented view controller" 50 } 51 } 52 53 internal class MaxDurationWhileEditingExceededException: Exception { 54 override var reason: String { 55 "'videoMaxDuration' limits to 600 when 'allowsEditing=true'" 56 } 57 } 58 59 internal class InvalidMediaTypeException: GenericException<String?> { 60 override var reason: String { 61 "Cannot handle '\(param ?? "nil")' media type" 62 } 63 } 64 65 internal class FailedToCreateGifException: Exception { 66 override var reason: String { 67 "Failed to create image destination for GIF export" 68 } 69 } 70 71 internal class FailedToExportGifException: Exception { 72 override var reason: String { 73 "Failed to export requested GIF" 74 } 75 } 76 77 internal class FailedToWriteImageException: Exception { 78 override var reason: String { 79 "Failed to write data to a file" 80 } 81 } 82 83 internal class FailedToReadImageException: Exception { 84 override var reason: String { 85 "Failed to read picked image" 86 } 87 } 88 89 internal class FailedToReadImageDataException: Exception { 90 override var reason: String { 91 "Failed to read data from a file" 92 } 93 } 94 95 internal class FailedToReadVideoSizeException: Exception { 96 override var reason: String { 97 "Failed to read the video size" 98 } 99 } 100 101 internal class FailedToReadVideoException: Exception { 102 override var reason: String { 103 "Failed to read picked video" 104 } 105 } 106 107 internal class FailedToTranscodeVideoException: Exception { 108 override var reason: String { 109 "Failed to transcode picked video" 110 } 111 } 112 113 internal class UnsupportedVideoExportPresetException: GenericException<String> { 114 override var reason: String { 115 "Video cannot be transcoded with export preset: \(param)" 116 } 117 } 118 119 internal class FailedToPickVideoException: Exception { 120 override var reason: String { 121 "Video could not be picked" 122 } 123 } 124 125 internal class FailedToReadImageDataForBase64Exception: Exception { 126 override var reason: String { 127 "Failed to read image data to perform base64 encoding" 128 } 129 } 130