MOO-cows Mailing List Archive
Re: Defining New Error Codes?
>I'd like to know if it's possible to define new error codes; for instance,
>a MOO with monetary units might need an 'E_INSFUND' (insufficient funds)
>This should be defined as an error so that it evaluates false. Is there
>any way to do this short of a server hack? If not ... how tough of a
>server hack is it? :)
I have never tried this, but if willin to risk your system go for it. I
would be interested if this idea is all crap or not.
$error has a prop on it which is a list of all possible errors, and #0 holds
properties called .nothing, .ambiguous match and have the values #-1 etc.
Try edition those and usin $error:generate_error. . . I doubt that it will
work, but will somebody let me know if it does because the is proberbly so
interrupritation between the two, but if it does work . . .
Subject Index |