Log any errors during construction of the Ar2 plugin
Why
Currently we allow exceptions to propagate if they occur in the constructor of the plugin.
However, since plugins are/can be instantiated deep inside USD lazily when the registry is first accessed (i.e. SdrRegistry::GetInstance()), if an application isn't aware that plugins are loading and can throw exceptions, then any error might just be swallowed and lead to hard-to-debug issues.
This came about whilst prototyping our Ar2 shim plugin in Katana, triggering a misleading error loading Katana's USD RenderInfo plugin, caused, ultimately, by a Python exception in BAL(!).
What
Log any errors during construction of the Ar2 plugin
Why
Currently we allow exceptions to propagate if they occur in the constructor of the plugin.
However, since plugins are/can be instantiated deep inside USD lazily when the registry is first accessed (i.e.
SdrRegistry::GetInstance()
), if an application isn't aware that plugins are loading and can throw exceptions, then any error might just be swallowed and lead to hard-to-debug issues.This came about whilst prototyping our Ar2 shim plugin in Katana, triggering a misleading error loading Katana's USD RenderInfo plugin, caused, ultimately, by a Python exception in BAL(!).