forked from bartvdbraak/blender
Add a reason for why an Addon can not be loaded. This change gives a more detailed explanation of the issue and may help the Addon Developer to identify what exactly needs to be changed.
The current message 'addon not loaded' is a bit too sparse. Differential Revision: https://developer.blender.org/D11655
This commit is contained in:
parent
4968a0bdf9
commit
2851602052
@ -358,7 +358,8 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
|
||||
except Exception as ex:
|
||||
# if the addon doesn't exist, don't print full traceback
|
||||
if type(ex) is ImportError and ex.name == module_name:
|
||||
print("addon not found:", repr(module_name))
|
||||
print("addon not loaded:", repr(module_name))
|
||||
print("cause:", str(ex))
|
||||
else:
|
||||
handle_error(ex)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user