[Prev][Next][Index][Thread]

# Re: Possible bug

- Date: Wed, 27 Mar 1996 09:39:16 PST
- From:
- cc: moo-cows.PARC@xerox.com
- In-Reply-to: "Brian Buchanan's message of \"Tue, 26 Mar 1996 22:51:48 PST\" <199603270651.WAA12236@wasteland.calbbs.com>"

    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>

- Prev: Re: Possible bug
- Next: possible memory leak in 1.8.0p1
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index