Open BigRoy opened 1 year ago
Is your feature request related to a problem? Please describe.
When an error occurs in a Python chaser the only error given is:
# Error: RuntimeError: Tf Python Exception
It'd be great if instead it could somehow provide a stack trace to the source line of code of the Python class for the tracer.
Reproducable:
import mayaUsd.lib as mayaUsdLib class CrashChaser(mayaUsdLib.ExportChaser): def PostExport(self): raise RuntimeError("error") return True mayaUsdLib.ExportChaser.Unregister(CrashChaser, "crash") mayaUsdLib.ExportChaser.Register(CrashChaser, "crash") from maya import cmds cmds.loadPlugin("mayaUsdPlugin", quiet=True) cmds.mayaUSDExport(file="E:/test.usd", frameRange=(1, 5), frameStride=1.0, chaser=["crash"], selection=True)
Similarly a confusing error is raised if e.g. PostExport method does not return True:
PostExport
return True
import mayaUsd.lib as mayaUsdLib class CrashChaser(mayaUsdLib.ExportChaser): def PostExport(self): pass mayaUsdLib.ExportChaser.Unregister(CrashChaser, "crash") mayaUsdLib.ExportChaser.Register(CrashChaser, "crash") from maya import cmds cmds.loadPlugin("mayaUsdPlugin", quiet=True) cmds.mayaUSDExport(file="E:/test.usd", frameRange=(1, 5), frameStride=1.0, chaser=["crash"], selection=True)
Which gives:
# # Traceback (most recent call last): # # File "<maya console>", line 14, in <module> # # File "<string>", line 2, in mayaUSDExport # # RuntimeError: Maya command error
Describe the solution you'd like
Improve the error messages for developers so they know what's acting up and how they should continue.
Additional context
The raised errors being unclear was also mentioned here and here.
Issue synced internally to EMSUSD-810
Is your feature request related to a problem? Please describe.
When an error occurs in a Python chaser the only error given is:
It'd be great if instead it could somehow provide a stack trace to the source line of code of the Python class for the tracer.
Reproducable:
Similarly a confusing error is raised if e.g.
PostExport
method does notreturn True
:Which gives:
Describe the solution you'd like
Improve the error messages for developers so they know what's acting up and how they should continue.
Additional context
The raised errors being unclear was also mentioned here and here.