Jose' Matos wrote: > Hello, > I have implemented the --try-hard option. As you can see it will catch any > python exception in the convertion step and ignore it. > > My question is how to warn the user that something wrong happened during > the convertion? The goal would be to ask the user to report it to us.
Log all exceptions generated at that point, hopefully with a lot of extra detail about the user variables at that moment at all frames of the stack. Dump all that to a text file, and ask the user to mail it. You can even ask if they want it mailed and do it for them automatically (python has full mailing capabilities built in). Have a look at IPython's CrashHandler and ultraTB classes, they provide all that functionality (except I haven't added the auto-email thingie). Feel free to lift any of that code and adapt it to your needs. With those detailed tracebacks, I've often been able to understand and fix ipython crashes which could only be produced via some obscure combinations of steps relying on specific user data, input or platform I don't have access to. And yet the tracebacks contain enough info that I can figure out what went wrong and fix it on my side. It's worked extremely well for me over the years. Cheers, f
