
throw(3)              LPC 系统函数              throw(3)

名称
     throw() - forces an error to occur in an object.

语法
     void throw(mixed);

描述
     The throw() efun may be used to force an error to  occur  in
     an  object.   When  used in conjunction, throw() and catch()
     allow  the  programmer  to  choose  what  error  message  is
     displayed  when  a  runtime  error  occurs.  When throw() is
     used, it should be used in  conjunction  with  the  catch(3)
     efun.  Here is a typical usage:

        string err;
        int rc;

        err = catch(rc = ob->move(dest));
        if (err) {
             throw("move.c: ob->move(dest): " + err + "\n");
             return;
        }

请参考
     catch(3), error(3), error_handler(4)

MudOS                Last change: 5 Sep 1994                    1

