Method: GLib.exit_application
- Defined in:
- lib/glib2.rb
.exit_application(exception, status) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/glib2.rb', line 33 def exit_application(exception, status) msg = exception. || exception.to_s msg = exception.class.to_s if msg == "" backtrace = exception.backtrace || [] first_line = backtrace.shift if first_line $stderr.puts("#{first_line}: #{msg}") else $stderr.puts(msg) end backtrace.each do |v| $stderr.puts("\t from #{v}") end exit(status) end |