struct
Logit::ExceptionInfo
- Logit::ExceptionInfo
- Struct
- Value
- Object
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.crConstructors
-
.from_exception(ex : Exception) : self
Creates an ExceptionInfo from a Crystal exception.
-
.new(type : String, message : String, stacktrace : Nil | Array(String) = nil)
Creates a new ExceptionInfo with the given details.
Instance Method Summary
-
#message : String
The exception message.
-
#message=(message : String)
The exception message.
-
#stacktrace : Array(String) | Nil
Stack trace as an array of strings, or nil if not available.
-
#stacktrace=(stacktrace : Array(String) | Nil)
Stack trace as an array of strings, or nil if not available.
-
#type : String
The exception class name (e.g., "ArgumentError").
-
#type=(type : String)
The exception class name (e.g., "ArgumentError").
Constructor Detail
def self.new(type : String, message : String, stacktrace : Nil | Array(String) = nil)
#
Creates a new ExceptionInfo with the given details.
Instance Method Detail
def stacktrace=(stacktrace : Array(String) | Nil)
#
Stack trace as an array of strings, or nil if not available.