Skip to content

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

  • documentationLinks
    An array of string URLs linking to documentation pertaining to the error.
  • fullIdentifier
  • gitHubIssues
    An array of string URLs linking to related issues on Vapor’s GitHub repo.
  • identifier
    Some unique identifier for this specific error. This will be used to create the identifier property. Do NOT use String(reflecting: self) or String(describing: self) or there will be infinite recursion
  • logLevel
    Which log level this error should report as. Defaults to .warning.
  • possibleCauses
    A String array describing the possible causes of the error.
  • reason
    The reason for the error. Usually one sentence (that should end with a period).
  • source
    Optional source for this error
  • stackOverflowQuestions
    An array of string URLs linking to related Stack Overflow questions.
  • stackTrace
    Stack trace from which this error originated (must set this from the error’s init)
  • suggestedFixes
    A String array listing some common fixes for the error.

Instance Methods

  • debuggableHelp(format:)
    A computed property returning a String that encapsulates why the error occurred, suggestions on how to fix the problem, and resources to consult in debugging (if these are available).

Type Properties

  • readableName
    A 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.
  • typeIdentifier
    A unique identifier for the error’s Type.

Relationships

Inherits From

  • Foundation.LocalizedError
  • Swift.CustomDebugStringConvertible
  • Swift.CustomStringConvertible
  • Swift.Error
  • Swift.Sendable
  • Swift.SendableMetatype

Conforming Types