class Honeybadger::Payload
- Honeybadger::Payload
- Reference
- Object
Overview
A Payload is a json renderable object which conforms to the honeybadger json schema for exceptions
This payload provides a baseline for general use and is intended to be extended by framework or application specific uses to fill in details.
Direct Known Subclasses
Defined in:
honeybadger/payload.crConstant Summary
-
STACK_FRAME =
/^ (?<path>[^:]+) # filename :(?<line>[\d]+) # line number :(?<char>[\d]+) # character offset \sin\s # fixed seperator '(?<method>[^']+)' # method name $/x
Constructors
-
.new(exception : Exception)
Subclasses of Payload can still set @exception, but will likely need to take additional parameters.
- .new(message : String, *, error_class : String | Nil = nil)
Instance Method Summary
-
#context_json(builder)
Renders request context provided by http middleware.
- #error_class : String | Nil
- #error_class=(error_class : String | Nil)
- #error_message : String | Nil
- #error_message=(error_message : String | Nil)
-
#request_json(builder)
A basic request object contains just a context object.
-
#set_context(hash_context : Hash) : Nil
Allows manually appending context
-
#to_json(builder : JSON::Builder)
Renders the complete json payload.
Constructor Detail
def self.new(exception : Exception)
#
Subclasses of Payload can still set @exception, but will likely need to take additional parameters.
Instance Method Detail
def request_json(builder)
#
A basic request object contains just a context object. Override this to embed actual request details.