-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related: * `TODO:2023-03-27-23-55-09` Refactor: Re-write `RNIModalView` error creation and handling.
- Loading branch information
1 parent
1854875
commit d25283b
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// RNIModalError.swift | ||
// react-native-ios-modal | ||
// | ||
// Created by Dominic Go on 5/10/23. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum RNIModalErrorCode: String, RNIErrorCode { | ||
case modalAlreadyVisible, | ||
modalAlreadyHidden, | ||
dismissRejected; | ||
}; | ||
|
||
public struct RNIModalError: RNIError { | ||
|
||
public typealias ErrorCode = RNIModalErrorCode; | ||
|
||
public static var domain = "react-native-ios-modal"; | ||
|
||
public var code: RNIModalErrorCode; | ||
public var message: String?; | ||
|
||
public var debugMessage: String?; | ||
public var debugData: Dictionary<String, Any>?; | ||
|
||
public var fileID: String?; | ||
public var functionName: String?; | ||
public var lineNumber: Int?; | ||
|
||
public init( | ||
code: ErrorCode, | ||
message: String?, | ||
debugMessage: String? | ||
) { | ||
self.code = code; | ||
self.message = message; | ||
self.debugMessage = debugMessage; | ||
}; | ||
}; |