On Thu, 2012-04-19 at 16:32 -0400, Lloyd Kvam wrote: > I am hoping one of you can point me in the right direction. My > alternative appears to be (painfully) writing some VB code to discard > the traceback lines from Err.Description.
I read more carefully through Python Programming on Win32 and came up with this code: """""""""""""""""""""""""""""""""""""""""""""""""""""""""" class DefaultDebugDispatcher( win32com.server.dispatcher.DefaultDebugDispatcher): def _HandleException_(self): excls,exself = sys.exc_info()[:2] if not IsCOMServerException(excls): raise COMException(description = str(exself), scode = winerror.E_INVALIDARG, ) raise useDispatcher = DefaultDebugDispatcher """""""""""""""""""""""""""""""""""""""""""""""""""""""""" I tried several other winerror codes, but they all wiped out my description. This seems to work for my purposes. There is some additional code that emails traces to me, but I snipped it since it makes little sense without a lot more context. Please let me know if I missed a better approach. Thanks very much for your attention. -- Lloyd Kvam Venix Corp DLSLUG/GNHLUG library http://dlslug.org/library.html http://www.librarything.com/catalog/dlslug http://www.librarything.com/catalog/dlslug&sort=stamp http://www.librarything.com/rss/recent/dlslug _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32