struct ExceptionalResponse <: Exception
A type of exception which wraps an HTTP Response object. The thrown exception will propagate until it is caught up the app stack or ultimately by Genie and the wrapped response is sent to the client.
If the user is not authenticated, an
ExceptionalResponse is thrown - if the exception is not caught in the app's stack, Genie will catch it and return the wrapped
Response object, forcing an HTTP redirect to the login page.
isauthenticated() || throw(ExceptionalResponse(redirect(:show_login)))
struct FileExistsException <: Exception
Custom exception type for signaling that the requested file already exists.
struct InternalServerException <: Exception
Dedicated exception type for server side exceptions. Results in a 500 error by default.
struct NotFoundException <: Exception
Specialized exception representing a not found resources. Results in a 404 response being sent to the client.
Represents an unexpected and unhandled runtime exceptions. An error event will be logged and the exception will be sent to the client, depending on the environment (the error stack is dumped by default in dev mode or an error message is displayed in production).
It allows defining custom error message and info, as well as an error code, in addition to the exception object.