class Marten::Handlers::Defaults::Debug::ServerError

Overview

Handles server errors in debug mode.

Defined in:

marten/handlers/defaults/debug/server_error.cr
marten/handlers/defaults/debug/server_error/frame.cr

Instance Method Summary

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

context context, delete delete, dispatch : Marten::HTTP::Response dispatch, get get, head(status : ::HTTP::Status | Int32) : HTTP::Response
head
head
, json(raw_json : String, status : ::HTTP::Status | Int32 = 200)
json(serializable, status : ::HTTP::Status | Int32 = 200)
json
, options options, params : Marten::Routing::MatchParameters 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 : ::HTTP::Status | Int32 = 200) render, request : Marten::HTTP::Request request, respond(streamed_content : Iterator(String), content_type = HTTP::Response::DEFAULT_CONTENT_TYPE, status : ::HTTP::Status | Int32 = 200)
respond(content = "", content_type = HTTP::Response::DEFAULT_CONTENT_TYPE, status : ::HTTP::Status | Int32 = 200)
respond
, response : Marten::HTTP::Response? response, response! response!, reverse(*args, **options)
reverse(*args, **options, &)
reverse
, trace trace, url(name : String | Symbol, **kwargs) : String url

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

new(request : HTTP::Request, params : Routing::MatchParameters)
new(request : HTTP::Request, **kwargs)
new

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

content_security_policy_block content_security_policy_block, http_method_names
http_method_names(*method_names : String | Symbol)
http_method_names

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

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

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, &)
flash

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

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

Macros inherited from module Marten::Handlers::Callbacks

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

Macros inherited from module Marten::Core::DebugModeLoggable

debug_mode_debug_log(message) debug_mode_debug_log, debug_mode_info_log(message) debug_mode_info_log

Instance Method Detail

def bind_error(error : Exception) #

[View source]
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 #

[View source]
def frames #

[View source]
def status=(status : Int32) #

[View source]
def template_snippet_lines #

[View source]