MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Possible bug
Brian Buchanan writes:
> eval-d `raise(E_PERM) ! E_PERM => E_INVARG'
> => E_PERM (Permission denied)
>
> Shouldn't this return E_INVARG, even if the debug bit is unset? Otherwise it
> kinda defeats the purpose of the `' notation if used in !d verbs.
When a verb is !d, any built-in function call or primitive MOO expression that
raises an error simply returns that error as the value of the expression.
That's what happened here; as someone later pointed out, in a !d verb
raise(X)
is equivalent to
X
so your example is equivalent to
`E_PERM ! E_PERM => E_INVARG'
which is clearly equivalent to
E_PERM
(since the simple literal expression (E_PERM) can't raise an error).
There isn't any purpose in using either `...' or try...except...endtry in a !d
verb. You should figure out why the verb used to be !d, fix those specific
expressions or statements using `...' or try...except...endtry, and then make
the verb +d again, working toward the proper goal of the elimination of all !d
verbs.
Pavel
References:
- Possible bug
- From: Brian Buchanan <brian@wasteland.calbbs.com>
Home |
Subject Index |
Thread Index