mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 00:36:08 +02:00
error_mcu: Report reactor stats in error_mcu module
Move reactor debugging info from main klippy.py code to error_mcu code for improved exception handling. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -93,6 +93,9 @@ class PrinterMCUError:
|
||||
self._check_mcu_shutdown(msg, details)
|
||||
else:
|
||||
self.printer.update_error_msg(msg, "%s%s" % (msg, message_shutdown))
|
||||
# Report reactor info (no good place to do this, so done here)
|
||||
logging.info("Reactor garbage collection: %s",
|
||||
self.printer.get_reactor().get_gc_stats())
|
||||
def _check_protocol_error(self, msg, details):
|
||||
host_version = self.printer.start_args['software_version']
|
||||
msg_update = []
|
||||
|
||||
@@ -211,8 +211,6 @@ class Printer:
|
||||
cb()
|
||||
except:
|
||||
logging.exception("Exception during shutdown handler")
|
||||
logging.info("Reactor garbage collection: %s",
|
||||
self.reactor.get_gc_stats())
|
||||
for cb in self.event_handlers.get("klippy:analyze_shutdown", []):
|
||||
try:
|
||||
cb(msg, details)
|
||||
|
||||
Reference in New Issue
Block a user