|
From: Samuele P. <ped...@bl...> - 2001-11-02 12:42:35
|
I'm a bit pedantic :)
>
> if (exc instanceof PySyntaxError) {
> PySyntaxError se = (PySyntaxError)exc;
> se.instantiate();
IMHO all code outside the jython codebase should
not rely on the fact that the codebase throws
SyntaxError wrapped as PySyntaxError instances and not
generic PyException instances. That's an impl.
detail and I can imagine a remote scenario where
some imports trigger an import hook which sometimes
programmatically raises a SyntaxError (which then would
not be wrapped in a PySyntaxError) ...
so the above code should be in the form:
if (Py.matchException(exc,Py.SyntaxError) {
...
regards, Samuele.
|