Protocol
DebuggableError
Debuggable provides an interface that allows a type to be more easily debugged in the case of an error.protocol DebuggableError : LocalizedError, CustomDebugStringConvertible, CustomStringConvertible
Topics
Instance Properties
var documentationLinks: [String]An array of stringURLs linking to documentation pertaining to the error.var fullIdentifier: Stringvar gitHubIssues: [String]An array of stringURLs linking to related issues on Vapor’s GitHub repo.var identifier: StringSome unique identifier for this specific error. This will be used to create theidentifierproperty. Do NOT useString(reflecting: self)orString(describing: self)or there will be infinite recursionvar logLevel: Logger.LevelWhich log level this error should report as. Defaults to.debug: most errors are handled by answering the request, so only implement this to make one louder.var possibleCauses: [String]AStringarray describing the possible causes of the error.var reason: StringThe reason for the error. Usually one sentence (that should end with a period).var source: ErrorSource?Optional source for this errorvar stackOverflowQuestions: [String]An array of stringURLs linking to related Stack Overflow questions.var suggestedFixes: [String]AStringarray listing some common fixes for the error.
Instance Methods
func debuggableHelp(format: HelpFormat) -> StringA computed property returning aStringthat encapsulates why the error occurred, suggestions on how to fix the problem, and resources to consult in debugging (if these are available).
Type Properties
static var readableName: StringA readable name for the error’s Type. This is usually similar to the Type name of the error with spaces added. This will normally be printed proceeding the error’s reason.static var typeIdentifier: StringA unique identifier for the error’s Type.
Default Implementations
Relationships
Inherits From
FoundationEssentials.LocalizedErrorSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.ErrorSwift.SendableSwift.SendableMetatype