-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show errors on console under plugin development #1302
Changes from all commits
00dcdab
d41d01b
da7f236
a65f90c
34dc637
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,12 @@ def thread_create(title) | |
yield | ||
thread_exit = true | ||
rescue Exception => e | ||
if @under_plugin_development | ||
STDERR.puts "\nError raised in thread from #thread_create, #{e.class}:#{e.message}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Head There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this code expects that leading text is '.' (means progress of test cases) from test runner, without tailing newline. |
||
e.backtrace.each do |msg| | ||
STDERR.puts [" ", msg].join | ||
end | ||
end | ||
log.warn "thread exited by unexpected error", plugin: self.class, title: title, error: e | ||
thread_exit = true | ||
raise | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If one thread is dead, we should replace dead thread with new active one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Dead flush thread means any kind of bug of
output.rb
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
Off topic. Collecting live and dead threads information is good for debug.
If one thread is dead, it means other thread also becomes dead.
If this situation continues, all output threads are dead.
We should display the message when all output threads are dead.