struct Logit::ExceptionInfo

Overview

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.

Defined in:

logit/events/event.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_exception(ex : Exception) : self #

Creates an ExceptionInfo from a Crystal exception.


[View source]
def self.new(type : String, message : String, stacktrace : Nil | Array(String) = nil) #

Creates a new ExceptionInfo with the given details.


[View source]

Instance Method Detail

def message : String #

The exception message.


[View source]
def message=(message : String) #

The exception message.


[View source]
def stacktrace : Array(String) | Nil #

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


[View source]
def stacktrace=(stacktrace : Array(String) | Nil) #

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


[View source]
def type : String #

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


[View source]
def type=(type : String) #

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


[View source]