# toerror()

Don Schwarz (darkowl@darkowl.pr.mcs.net)
Mon, 5 Aug 1996 16:36:55 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    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