Log errors during script loading.
(path: str, exc: Exception)
| 58 | |
| 59 | |
| 60 | def script_error_handler(path: str, exc: Exception) -> None: |
| 61 | """ |
| 62 | Log errors during script loading. |
| 63 | """ |
| 64 | tback = exc.__traceback__ |
| 65 | tback = addonmanager.cut_traceback( |
| 66 | tback, "invoke_addon_sync" |
| 67 | ) # we're calling configure() on load |
| 68 | tback = addonmanager.cut_traceback( |
| 69 | tback, "_call_with_frames_removed" |
| 70 | ) # module execution from importlib |
| 71 | logger.error(f"error in script {path}", exc_info=(type(exc), exc, tback)) |
| 72 | |
| 73 | |
| 74 | ReloadInterval = 1 |
no test coverage detected
searching dependent graphs…