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

Re: [zzdev] Errors and exceptions



Tuomas Lukka wrote:
> So we should classify the exceptional conditions as exceptions and errors.
> As background, Java requires explicit "throws" clauses for exceptions, but
> not for errors. Currently most things that go wrong in ZZ are errors in
> order to avoid "throws" clauses everywhere.

Right. I was thinking about that at some point, too.

> Opinions?

I agree with the classes you mention, but we also need a SyntaxError or
similar kind of thing for malformed structures: the program expects some
ZZ structure, but gets something else. This should probably be an error,
because it usually needs to be handled by the user somehow, not the
calling function.

-b.