1 // Copyright 2022-present 650 Industries. All rights reserved.
2 
3 // swiftlint:disable line_length
4 
5 import ABI49_0_0ExpoModulesCore
6 
7 internal final class UpdatesDisabledException: Exception {
8   override var code: String {
9     "ERR_UPDATES_DISABLED"
10   }
11 
12   override var reason: String {
13     "Cannot call module method when expo-updates is disabled"
14   }
15 }
16 
17 internal final class UpdatesNotInitializedException: Exception {
18   override var code: String {
19     "ERR_UPDATES_DISABLED"
20   }
21 
22   override var reason: String {
23     "The updates module controller has not been properly initialized. If you're in development mode, you cannot use this method. Otherwise, make sure you have called AppController.sharedInstance.start()"
24   }
25 }
26 
27 internal final class UpdatesReloadException: Exception {
28   override var code: String {
29     "ERR_UPDATES_RELOAD"
30   }
31 
32   override var reason: String {
33     "Could not reload application. Ensure you have set the `bridge` property of AppController."
34   }
35 }
36 
37 internal final class UpdatesUnsupportedDirectiveException: Exception {
38   override var code: String {
39     "ERR_UPDATES_UNSUPPORTED_DIRECTIVE"
40   }
41 
42   override var reason: String {
43     "Updates service response included a directive that this client does not support."
44   }
45 }
46 
47 internal final class UpdatesStateException: Exception {
48   convenience init(_ message: String) {
49     self.init(name: "UpdatesStateException", description: message, code: "ERR_UPDATES_STATE_EXCEPTION", file: #fileID, line: #line, function: #function)
50   }
51 }
52