Structure
Abort
Default implementation of
AbortError. You can use this as a convenient method for throwing AbortErrors without having to conform your own error-type to AbortError.struct Abort
Overview
throw Abort(.badRequest, reason: "Something's not quite right...")
Topics
Initializers
init(HTTPResponseStatus, headers: HTTPHeaders, reason: String?, identifier: String?, suggestedFixes: [String], file: String, function: String, line: UInt, column: UInt, range: Range<UInt>?)Create a newAbort, capturing current source location info.init(HTTPResponseStatus, headers: HTTPHeaders, reason: String?, identifier: String?, suggestedFixes: [String], file: String, function: String, line: UInt, column: UInt, range: Range<UInt>?, stackTrace: StackTrace?)
Instance Properties
var headers: HTTPHeadersSeeAbortError.var identifier: StringSeeDebuggablevar reason: StringSeeAbortErrorvar source: ErrorSource?Source location where this error was created.var stackTrace: StackTrace?Stack trace at point of error creation.var status: HTTPResponseStatusSeeAbortError
Type Methods
static func redirect(to: String, redirectType: Redirect) -> AbortCreates a redirectingAborterror.static func redirect(to: String, type: RedirectType) -> AbortCreates a redirectingAborterror.
Relationships
Conforms To
AbortErrorDebuggableErrorFoundationEssentials.LocalizedErrorSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.ErrorSwift.SendableSwift.SendableMetatype