Method: OpenC3.handle_critical_exception
- Defined in:
- lib/openc3/top_level.rb
.handle_critical_exception(error, try_gui = true) ⇒ Object
CriticalErrors are errors that need to be brought to a user’s attention but do not cause an exit. A good example is if the packet log writer fails and can no longer write the log file. Write a message to the Logger, write an exception file, and popup a GUI window if try_gui. Ensure the GUI only comes up once so this method can be called over and over by failing code.
395 396 397 398 |
# File 'lib/openc3/top_level.rb', line 395 def self.handle_critical_exception(error, try_gui = true) Logger.error "Critical Exception! #{error.formatted}" self.write_exception_file(error) end |