Particular exceptions names

kdevel kdevel at vogtner.de
Wed Jul 27 20:01:55 UTC 2022


On Tuesday, 26 July 2022 at 23:43:59 UTC, pascal111 wrote:
> In next example code, it used user-made exception,

> [...]

>        try {
>           if( b == 0 ) {
>              throw new Exception("Cannot divide by zero!");
>           } else {
>              result = format("%s",a/b);
>           }

> [...]

>     void main () {
>        int x = 50;
>        int y = 0;

What about the case x = -2147483648, y = -1?




More information about the Digitalmars-d-learn mailing list