lib/async/task.rb in async-2.18.0 vs lib/async/task.rb in async-2.19.0

- old
+ new

@@ -6,11 +6,11 @@ # Copyright, 2017, by Devin Christensen. # Copyright, 2020, by Patrik Wenger. # Copyright, 2023, by Math Ieu. require "fiber" -require "console/event/failure" +require "console" require_relative "node" require_relative "condition" Fiber.attr_accessor :async_task @@ -196,12 +196,10 @@ schedule do @block.call(self, *arguments) rescue => error # I'm not completely happy with this overhead, but the alternative is to not log anything which makes debugging extremely difficult. Maybe we can introduce a debug wrapper which adds extra logging. if @finished.nil? - Console::Event::Failure.for(error).emit(self, "Task may have ended with unhandled exception.", severity: :warn) - else - # Console::Event::Failure.for(error).emit(self, severity: :debug) + Console.warn(self, "Task may have ended with unhandled exception.", exception: error) end raise end else