U:RDoc::AnyMethod[iI"report_on_exception=:ETI"!Thread::report_on_exception=;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EWhen set to +true+, all threads will report the exception if an ;TI"1exception is raised. Returns the new state.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"'Thread.report_on_exception = true ;TI"t1 = Thread.new do ;TI" puts "In new thread" ;TI"% raise "Exception from thread" ;TI" end ;TI"sleep(1) ;TI"puts "In the main thread" ;T: @format0o; ; [I"This will produce:;T@o; ; [ I"In new thread ;TI"5prog.rb:4: Exception from thread (RuntimeError) ;TI"% from prog.rb:2:in `initialize' ;TI" from prog.rb:2:in `new' ;TI" from prog.rb:2 ;TI"In the main thread ;T; 0o; ; [I"$See also ::report_on_exception.;T@o; ; [I"OThere is also an instance level method to set this for a specific thread, ;TI"see #report_on_exception=.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I" true or false ;T0[I" (p1);T@+FI" Thread;TcRDoc::NormalClass00