
throw(3)              LPC Library Functions              throw(3)

NNAAMMEE
       throw() - forces an error to occur in an object.

SSYYNNOOPPSSIISS
       void throw(mixed);

DDEESSCCRRIIPPTTIIOONN
       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 dis-
       played 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;
          }

SSEEEE AALLSSOO
       catch(3), error(3), error_handler(4)

MudOS                       5 Sep 1994                          1

