https://bugs.freedesktop.org/show_bug.cgi?id=66025

--- Comment #43 from David Bolen <[email protected]> ---
(In reply to comment #42)
> I recoded our exception form to only import uno when it was needed and the
> traces showed what the error was in HttpServer.  This is now being fixed.
(...)
> If someone knows how to throw the original exception there would seem not
> much more we can do with this issue.  A back port to 4.1 would be nice
> though.

It's a bit of a catch-22.  If uno re-throws the exact original exception
directly, while best for regular import failures, it's worse on LO import
failures since the exception will only refer to a top level com module.  And
the uno code can't know for sure which case it is in.

But it's still an ImportError, and the traceback should help.  I'm wondering if
a trade-off I made in the current patch favors uno imports too much.  It skips
the lowest frame from the _g_delegatee failure at a given level, which works
well for uno failures since it avoids many extra g_delegatee frames while the
"fake" uno module hierarchy is traversed, but is probably hiding needed frames
in non-uno nested import failures.

Would it be possible for you to reintroduce the httpserver error, then try the
patched version of uno.py but with the following change:

--- uno.py.patch    2013-07-24 06:54:38.703357947 -0400
+++ uno.py    2013-07-24 16:26:29.436937908 -0400
@@ -266,2 +266,3 @@
     except ImportError as e:
+        python_tb = sys.exc_info()[2]
         # process optargs
@@ -318,3 +319,3 @@
                              (name, name, x))
-             e.__traceback__ = sys.exc_info()[2]
+             e.__traceback__ = python_tb


and let me know if this produces a traceback that would have worked for your
issue with httpserver (without needing to remove the uno import)?  It still
won't be exactly the same as the original Python exception and traceback, but
should have all the needed references to the OpenLP code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to