-
Notifications
You must be signed in to change notification settings - Fork 0
Error
Antoine CLOP edited this page Oct 19, 2017
·
2 revisions
struct GenericErrorStruct: LocalizedError {
var errorDescription: String
var failureReason: String
var recoverySuggestion: String
var helpAnchor: String
}
var internalError: GenericErrorStruct
init(_ msg: String)
init(description: String?, failure: String? = nil, recovery: String? = nil, help: String? = nil)
-
var internalError: GenericErrorStruct
: Contains 4 Strings that will provide description, reason, help and recovery suggestion. -
init(_ msg: String)
: Creates a GenericError object with msg value for errorDescription and failureReason. recoverySuggestion will have "No recovery available" value and helpAnchor will have "No help available". -
init(description: String?, failure: String? = nil, recovery: String? = nil, help: String? = nil)
: Creates a GenericError object with description for errorDescription, failure for failureReason, recovery for recoverySuggestion and help for helpAnchor