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:
@@ -358,7 +358,8 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
# if the addon doesn't exist, don't print full traceback
|
# if the addon doesn't exist, don't print full traceback
|
||||||
if type(ex) is ImportError and ex.name == module_name:
|
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:
|
else:
|
||||||
handle_error(ex)
|
handle_error(ex)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user