gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz] Re: [Gzz-commits] gzz ./TODO doc/Gzz_Frontend_Vobs.rst


From: Benja Fallenstein
Subject: [Gzz] Re: [Gzz-commits] gzz ./TODO doc/Gzz_Frontend_Vobs.rst
Date: Fri, 03 Jan 2003 21:47:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9

Asko Soukka wrote:
Fri, 3 Jan 2003, Tuomas J. Lukka wrote:

        - enhancing umltool
+           - make umltool rst loop not stop when an error
+             in parsing the uml code is encountered -- for example,
+             replace a "-" with a "--" in an association to get such
+             an error.


:/ So, this throws on assertion error, which exits Jython.

Benja, Vegai? Do you have any idea how this exiting can be avoided?

try:
    ...
except AssertionError:
    ...

OTOH, the idea is that assertion errors are raised when a method's contract is violated, i.e. you assume that AssertionError will never be raised when there are no bugs. Given this proper use of assertions, they are the wrong construct here and if ...: raise FooError(msg) should be used (where FooError is the exception class).

- Benja





reply via email to

[Prev in Thread] Current Thread [Next in Thread]