ErrorProtocol
enum ErrorProtocol : Error
A type representing an error value.
-
The bundle identifier cannot be retrieved.
Declaration
Swift
case bundleIdentifierNotAvailable
-
The platform cannot use this property or function.
Declaration
Swift
case platformNotSupported(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The platform version cannot use this property or function.
Declaration
Swift
case platformVersionNotSupported(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
Current schema version is lower than old schema version.
Declaration
Swift
case lowerSchemaVersion(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The data source cannot be retrieved.
Declaration
Swift
case datasourceNotAvailable(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The object cannot be created.
Declaration
Swift
case createFailed(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The object cannot be retrieved.
Declaration
Swift
case readFailed(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The object cannot be updated.
Declaration
Swift
case updateFailed(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The object cannot be deleted.
Declaration
Swift
case deleteFailed(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The specified object already exists.
Declaration
Swift
case duplicateObject(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The directory URL cannot be retrieved.
Declaration
Swift
case directoryURLNotAvailable
-
The directory URL with path cannot be retrieved.
Declaration
Swift
case directoryFullURLNotAvailable
-
Contents of directory cannot be retrieved.
Declaration
Swift
case directoryListNotAvailable(detail: String)
Parameters
detail
The detail to place after description of the error description.
-
The database cannot be retrieved.
Declaration
Swift
case databaseNotAvailable
-
Use a representation that was unknown when this code was compiled.
Declaration
Swift
case unknownRepresentation
-
Creates a new instance with the specified raw value.
If there is no value of the type that corresponds with the specified string value, this initializer returns nil.
Declaration
Swift
init?(rawValue: Int)
Parameters
rawValue
The raw value to use for the new instance.
-
The corresponding value of the raw type.
Declaration
Swift
var rawValue: Int { get }
-
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Returns a Boolean value indicating whether two values are equal.
Declaration
Swift
public static func == (lhs: ErrorProtocol, rhs: ErrorProtocol) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.
Return Value
true
if the first argument equals the second argument;false
if not.
-
Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the
Hashable
protocol. The components used for hashing must be the same as the components compared in your type’s==
operator implementation. Callhasher.combine(_:)
with each of these components.Important
Never call
finalize()
onhasher
. Doing so may become a compile-time error in the future.Declaration
Swift
public func hash(into hasher: inout Hasher)
Parameters
hasher
The hasher to use when combining the components of this instance.
-
A collection of all values of this type.
Declaration
Swift
public static var allCases: [ErrorProtocol] { get }
-
Setup entities before ErrorProtocol receives its first message.
Declaration
Swift
public static func setupEntities()
-
The key of the error.
Declaration
Swift
static var key: String { get }
-
The domain of the error.
Declaration
Swift
static var errorDomain: String { get }
-
The error code within the given domain.
Declaration
Swift
var errorCode: Int { get }
-
The user-info dictionary.
Declaration
Swift
var errorUserInfo: [String : Any] { get }
-
A localized message describing what error occurred.
Declaration
Swift
var errorDescription: String? { get }
-
A textual representation of this instance.
Declaration
Swift
var description: String { get }
-
A textual representation of this instance, suitable for debugging.
Declaration
Swift
var debugDescription: String { get }