Skip to content
Antoine CLOP edited this page Oct 19, 2017 · 2 revisions

Nested Types

  struct GenericErrorStruct: LocalizedError {
   var errorDescription: String
   var failureReason: String
   var recoverySuggestion: String
   var helpAnchor: String
 }

Properties

  • var internalError: GenericErrorStruct

Inits

  • init(_ msg: String)
  • init(description: String?, failure: String? = nil, recovery: String? = nil, help: String? = nil)

Definitions

  • 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

Clone this wiki locally