Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/better_errors/raised_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ class RaisedException
attr_reader :exception, :message, :backtrace

def initialize(exception)
if exception.respond_to?(:original_exception) && exception.original_exception
if exception.respond_to?(:cause) && exception.cause
exception = exception.cause
elsif exception.respond_to?(:original_exception) && exception.original_exception
exception = exception.original_exception
end

Expand Down