Skip to content

ExceptionInfo

struct

Defined in src/logit/events/event.cr:285

Structured exception information for log events.

Captures exception details in a format suitable for logging and analysis. Created automatically when an exception occurs in an instrumented method.

Constructors

.from_exception(ex : Exception) : self

View source

Creates an ExceptionInfo from a Crystal exception.


.new(type : String, message : String, stacktrace : Nil | Array(String) = nil)

View source

Creates a new ExceptionInfo with the given details.


Instance Methods

#message

View source

The exception message.


#stacktrace

View source

Stack trace as an array of strings, or nil if not available.


#type

View source

The exception class name (e.g., "ArgumentError").