The script_call_exception_handler kwarg for the EventHandler class can be used to pass in a function that will be called when an exception occurs inside a script call.
Example:
def exception_handler(func_name, script_exc):
logger.exception(f"An error has occurred in {func_name}: {str(script_exc)}", exc_info=script_exc)
event_handler = sciter.EventHandler(window=frame, script_call_exception_handler=exception_handler)
The
script_call_exception_handler
kwarg for the EventHandler class can be used to pass in a function that will be called when an exception occurs inside a script call.Example: