Re: textToIntevsal(s) and exceptions
On 16 Mar 2015, at 15:06, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> On 2015-03-16 07:51:51 -0700, Dmitry Nadezhin wrote:
>> However, I (as programmer) think that it would be useful if
>> syntax error is signalled by one exception and semantic error (l > u) is
>> signalled by another exception. So I asked this question to the group
>> because it seemed to me that we overlooked this.
>
> Note that InvalidOperand does not correspond to a syntax error, but
> to an internal encoding error. IMHO, the same UndefinedOperation
> exception is fine for both syntax and semantic errors. Since such an
> exception is language- or implementation-defined, the implementation
> could provide information on the error itself: the kind of the error,
> the position in the string where the error was detected, and so on.
Yes, this seems to me the sort of thing an implementation might do but which it is premature for 1788 to try doing till experience shows if it is useful.
John Pryce