struct

Logit::ExceptionInfo

Inherits Struct / Value / Object

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

Creates an ExceptionInfo from a Crystal exception.

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

Creates a new ExceptionInfo with the given details.

Source

Instance methods

message

The exception message.

Source
message=(message : String)

The exception message.

Source
stacktrace

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

Source
stacktrace=(stacktrace : Array(String) | Nil)

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

Source
type

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

Source
type=(type : String)

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

Source