Skip to content

Commit

Permalink
Unify way of printing exceptions from within fibers (#6594)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija authored and RX14 committed Sep 10, 2018
1 parent 2314da4 commit 58a8e27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fiber.cr
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ class Fiber
@proc.call
rescue ex
if name = @name
STDERR.puts "Unhandled exception in spawn(name: #{name}):"
STDERR.print "Unhandled exception in spawn(name: #{name}): "
else
STDERR.puts "Unhandled exception in spawn:"
STDERR.print "Unhandled exception in spawn: "
end
ex.inspect_with_backtrace STDERR
ex.inspect_with_backtrace(STDERR)
STDERR.flush
ensure
@@stack_pool << @stack
Expand Down
1 change: 1 addition & 0 deletions src/kernel.cr
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ module AtExitHandlers

STDERR.print "Unhandled exception: "
ex.inspect_with_backtrace(STDERR)
STDERR.flush
end

status
Expand Down

0 comments on commit 58a8e27

Please sign in to comment.