Skip to content

Instantly share code, notes, and snippets.

@wibed
Last active August 17, 2020 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wibed/0e78412efe249e07297f08431a12ad28 to your computer and use it in GitHub Desktop.
Save wibed/0e78412efe249e07297f08431a12ad28 to your computer and use it in GitHub Desktop.
// Convienience function for short throws
func defaultVaporError(
_ reason: String,
file: String = #file,
function: String = #function,
line: UInt = #line,
column: UInt = #column
) -> Abort {
return Abort(
.badRequest,
reason: reason,
file: file,
function: function,
line: line,
column: column
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment