Parcourir la source

[3095] Docstring for the traceback_handler

Michal 'vorner' Vaner il y a 11 ans
Parent
commit
50072746b4
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      src/lib/python/isc/util/traceback_handler.py

+ 7 - 0
src/lib/python/isc/util/traceback_handler.py

@@ -22,6 +22,13 @@ import traceback
 logger = isc.log.Logger('util')
 
 def traceback_handler(main):
+    """
+    Handle uncaught exception from the main callable.
+
+    The function runs the callable passed as main (it is called
+    without any provided parameters). If it raises any exception,
+    the exception is logged and the application terminated.
+    """
     try:
         return main()
     except Exception as e: