Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37807 > unrolled thread
| Started by | Kiwi User <martin@mydomain.invalid> (Kiwi User) |
|---|---|
| First post | 2017-12-10 21:50 +1200 |
| Last post | 2017-12-10 21:50 +1200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Two exceptions Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-10 21:50 +1200
| From | Kiwi User <martin@mydomain.invalid> (Kiwi User) |
|---|---|
| Date | 2017-12-10 21:50 +1200 |
| Subject | Re: Two exceptions |
| Message-ID | <742769493@f38.n261.z1.binkp.net> |
On Sun, 10 Dec 2017 00:52:14 +1200, Kiwi User wrote:
> On Sun, 10 Dec 2017 02:39:33 +0200, Victor Porton wrote:
>
>> I haven't considered this perhaps because Ada does not allow a class to
>> be a member of object (without wrapping it into something called
>> Indefinite_Wrapper or something similar). So in Ada this would be
>> inconvenient.
>>
> This looks like the best solution suggested so far, particularly if it
> is expanded to include an error message and provide a boolean isError()
> method.
Gaaaagh: Misplaced comment: I meant to say that I thought Eric's ParseResult
class looked, to me anyway, like the best solution I've seen so far.
It deals with all possible results neatly and doesn't need to use exception
handling for unexceptional results (matched, didn't match, unrecognised input)
so it leaves Exceptions free to handle parser internal errors AND, if extended
to hold error descriptions, it provides a neat way of returning error messages
without having to pass an error reporting channel reference to every operation
on the recursive parse stack.
--
Martin | martin at
Gregorie | gregorie
| dot org
Back to top | Article view | comp.lang.java.programmer
csiph-web