mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-05 06:48:48 +00:00
More error logging during plugin loads (#8408)
- Ensure all errors are logged
This commit is contained in:
parent
cc6a2f4548
commit
6cca66cafa
@ -572,16 +572,13 @@ class PluginsRegistry:
|
|||||||
try:
|
try:
|
||||||
self._init_plugin(plg, plugin_configs)
|
self._init_plugin(plg, plugin_configs)
|
||||||
break
|
break
|
||||||
except IntegrationPluginError:
|
|
||||||
# Error has been handled downstream
|
|
||||||
pass
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
# Handle the error, log it and try again
|
# Handle the error, log it and try again
|
||||||
|
if attempts == 0:
|
||||||
handle_error(
|
handle_error(
|
||||||
error, log_name='init', do_raise=settings.PLUGIN_TESTING
|
error, log_name='init', do_raise=settings.PLUGIN_TESTING
|
||||||
)
|
)
|
||||||
|
|
||||||
if attempts == 0:
|
|
||||||
logger.exception(
|
logger.exception(
|
||||||
'[PLUGIN] Encountered an error with %s:\n%s',
|
'[PLUGIN] Encountered an error with %s:\n%s',
|
||||||
error.path,
|
error.path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user