lib/console/event/failure.rb in console-1.26.0 vs lib/console/event/failure.rb in console-1.27.0
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2021, by Robert Schulze.
+# Copyright, 2024, by Patrik Wenger.
require_relative 'generic'
module Console
module Event
@@ -25,10 +26,12 @@
end
def self.log(subject, exception, **options)
Console.error(subject, **self.for(exception).to_hash, **options)
end
-
+
+ attr_reader :exception
+
def initialize(exception, root = Dir.getwd)
@exception = exception
@root = root
end