Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Possible mapping of exceptions



Dear John,

Thank you. I wanted THIS answer.

I'm reviewing now a C++ library in which 1788 exceptions are expressed
as in this example - by return flags and not by C++ exception. This
library is nice and I hope that it will become 1788-conforming at last.

  -Dima

----- Original Message -----
From: j.d.pryce@xxxxxxxxxx
To: dmitry.nadezhin@xxxxxxxxxx
Cc: stds-1788@xxxxxxxx
Sent: Friday, January 13, 2017 9:25:34 AM GMT +03:00 Iraq
Subject: Re: Possible mapping of exceptions

Dear Dmitry

> On 12 Jan 2017, at 17:48, Dmitry Nadezhin <dmitry.nadezhin@xxxxxxxxxx> wrote:
> Is this a correct interpretation of 12.1.3 ?
> Is this mechanism conforming ?

I'm not sure what sort of answer you want. As it says "language- or implementation-defined" could you not write
> ...
>  case EXC_UNDEFINED_OPERATION:
>      <handle exception>;
>      play "Jingle bells" and charge the user's account 1 Euro
>      break;
> ...
and it would still be conforming? I'm not knowledgeable in C++ but what you write looks like "do something, which probably depends on which exception was raised", so: yes, that looks OK.

John Pryce