HTTP::ErrorHandler

class HTTP::ErrorHandler

Overview

A handler that invokes the next handler and, if that next handler raises an exception, returns with a 500 (Internal Server Error) status code.

In verbose mode prints the exception with its backtrace to the response, else a generic error message is returned to the client. Use the HTTP::LogHandler before this to log the exception on the server side.

Included Modules

Defined in:

http/server/handlers/error_handler.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.new(verbose : Bool = false)Source

Instance Method Detail

def call(context)Source

© 2012–2017 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.22.0/HTTP/ErrorHandler.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部