MOO-cows Mailing List Archive

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

toerror()



While we're doing all of these modifications to MOO types can we also have a
toerror() built-in?  I realize that it can be done very easily in-DB but it
shouldn't have to be.  Every other type has a function that converts from
any other type to it except for errors.  Here's some suggestions of things
it should be able to do:
   toerror(toliteral(E_VARNF)) => E_VARNF
   toerror(tonum(E_VARNF))     => E_VARNF
   toerror(tostr(E_VARNF))     => E_VARNF (?)
and I guess toerror( <some object> ) should raise an E_TYPE, although
returning E_NONE or toerror(tonum( <error> )) might be better.
                                                      --Dark_Owl



Home | Subject Index | Thread Index