class Marten::Handlers::Defaults::Debug::PageNotFound


Handles page not found errors in debug mode.

A "welcome" page is returned by this Handler if the requested path corresponds to the root of the application. Otherwise, a standard "Page not found" response is returned.

Defined in:


Instance Method Summary

Instance methods inherited from class Marten::Handlers::Base

delete delete, dispatch : Marten::HTTP::Response dispatch, get get, head(status : Int32) : HTTP::Response
, json(raw_json : String, status = 200)
json(serializable, status = 200)
, options options, params : Hash(String, Int16 | Int32 | Int64 | Int8 | String | UInt16 | UInt32 | UInt64 | UInt8 | UUID) params, patch patch, post post, put put, redirect(url : String, permanent = false) redirect, render(template_name : String, context : Hash | NamedTuple | Nil | Marten::Template::Context = nil, content_type = HTTP::Response::DEFAULT_CONTENT_TYPE, status = 200) render, request : Marten::HTTP::Request request, respond(content = "", content_type = HTTP::Response::DEFAULT_CONTENT_TYPE, status = 200) respond, response : Marten::HTTP::Response? response, response! response!, reverse(*args, **options)
reverse(*args, **options, &)
, trace trace

Constructor methods inherited from class Marten::Handlers::Base

new(request : HTTP::Request, params : ParamsHash)
new(request : HTTP::Request, **kwargs)

Class methods inherited from class Marten::Handlers::Base

http_method_names(*method_names : String | Symbol)

Instance methods inherited from module Marten::Handlers::Session

session(*args, **options)
session(*args, **options, &)

Instance methods inherited from module Marten::Handlers::RequestForgeryProtection

get_csrf_token get_csrf_token, referer_trusted? referer_trusted?

Instance methods inherited from module Marten::Handlers::Flash

flash(*args, **options)
flash(*args, **options, &)

Instance methods inherited from module Marten::Handlers::Cookies

cookies(*args, **options)
cookies(*args, **options, &)

Macros inherited from module Marten::Handlers::Callbacks

after_dispatch(*names) after_dispatch, before_dispatch(*names) before_dispatch

Instance Method Detail

def dispatch #
Description copied from class Marten::Handlers::Base

Triggers the execution of the handler in order to produce an HTTP response.

This method will be called by the Marten server when it comes to produce an HTTP response once a handler has been identified for the considered route. This method will execute the handler method associated with the considered HTTP method (eg. #get for the GET method) in order to return the final HTTP response. A 405 response will be returned if the considered HTTP method is not allowed. The #dispatch method can also be overridden on a per-handler basis in order to implement any other arbitrary logics if necessary.

[View source]
def error : Exception? #

[View source]
def error=(error : Exception | Nil) #

[View source]