223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
# File 'lib/main/program/instance_methods.rb', line 223
def handle_exception(e)
if e.respond_to?(:error_handler_before)
fcall(e, :error_handler_before, self)
end
if e.respond_to?(:error_handler_instead)
fcall(e, :error_handler_instead, self)
else
if e.respond_to?(:status)
exit_status(( e.status ))
end
if Softspoken === e or SystemExit === e
quiet = ((SystemExit === e and e.message.respond_to?('abort')) or
(SystemExit === e and e.message == 'exit'))
stderr.puts e.message unless quiet
else
fatal{ e }
end
end
if e.respond_to?(:error_handler_after)
fcall(e, :error_handler_after, self)
end
exit_status(( exit_failure )) if exit_status == exit_success
exit_status(( Util.integer(exit_status) rescue(exit_status ? 0 : 1) ))
end
|