LaidlawFX Posted September 1, 2017 Share Posted September 1, 2017 Hello, I was wondering how you format to handle a hou.OperationFailed exception. I was using the below function to convert the file sop to python, because yeah... http://www.sidefx.com/docs/houdini/hom/hou/Geometry#saveToFile but in order to catch the exception it raises hou.OperationFailed http://www.sidefx.com/docs/houdini/hom/hou/OperationFailed So this is not the case for try, except in python. My Houdini Feng Shui is just not showing me the way at the moment. Thanks, -Ben Quote Link to comment Share on other sites More sharing options...
f1480187 Posted September 1, 2017 Share Posted September 1, 2017 I usually do this: try: hou.do_stuff() except hou.OperationFailed: scold_user() Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted September 2, 2017 Author Share Posted September 2, 2017 Cool. I'll give it a go. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.