Hey Jeremie, There was a thread about this a while ago (https://groups.google.com/forum/#!topic/xsi_list/lpAw3Gid2gY), but it didn't come to any solid conclusions, other than wrapping your functions in a decorator.
there is a COM exception handler (cos, y'know, awesome COM stuff) but no clear way to overload it. soooo, decorators... cheers, chrisg On 19 November 2013 09:17, Jeremie Passerin <[email protected]> wrote: > Hey guys, > > I'm asking the question here, maybe someone has an idea. One of our > developer is working on some pipeline tools and needs to catch exceptions > raised in Softimage. > Here is message : > > Softimage does not appear to pass errors to python's sys.stderr, even when > they are python related. > This is a simplified example of the Python Logger we use. It has the useful > functionality of sending > error report emails any time a error happens in python. Unfortunately, due > to Softimage not reporting > errors to sys.stderr most of these errors go unlogged. We would like to find > a way to capture these > errors. Yes, these errors get printed to sys.stdout, but I would like to > know if there is a way in > Softimage to monitor for errors without having to parse every print > statement. > > I have attached the code sample to the email. You just need to save it in > C:\temp\softimage.py and run the following code in the script editor. > > import sys > sys.path.append(r'C:\temp') > import softimage > print 'Printed to the pluginlog.log' > raise Exception('This exception appears in Softimage, but is not logged into > the pluginerror.log') > > Any help would be greatly appreciated ;-) > > thanks, > Jeremie

