Thread overview
catch the assert
Nov 12, 2003
Kazuhiro Inaba
Nov 14, 2003
Walter
Nov 14, 2003
Kazuhiro Inaba
November 12, 2003
According to the reference document, assert() throws an exception and we can catch it. So I tried to write code with this technique, but then i run into a problem.

Thrown object's class seems to be std.assert.Assert, but since "assert" is a reserved identifier, I cannot do:

import std.assert;

Is there any way to deal with this? Or, std.assert is only for internal use and
we should catch the exceptions from assert() with catch(Object o) {} ?

-- 
K.INABA( ki@kmonos.net )
November 14, 2003
"Kazuhiro Inaba" <Kazuhiro_member@pathlink.com> wrote in message news:botnq7$2uqv$1@digitaldaemon.com...
> According to the reference document, assert() throws an exception and we
can
> catch it. So I tried to write code with this technique, but then i run
into a
> problem.
>
> Thrown object's class seems to be std.assert.Assert, but since "assert" is
a
> reserved identifier, I cannot do:
>
> import std.assert;

Yes, that's a bug I need to fix.

> Is there any way to deal with this? Or, std.assert is only for internal
use and
> we should catch the exceptions from assert() with catch(Object o) {} ?

That will work for the moment.


November 14, 2003
In article <bp389v$2ih5$2@digitaldaemon.com>, Walter says...
>Yes, that's a bug I need to fix.

Thanks. I'll wait for it.