.\"forces an error to occur in an object. .DT throw $MUDNAME$ driver help throw .SH Name .SI 5 throw() - forces an error to occur in an object .EI .SH Synopsis .SI 5 void throw( mixed arg ); .EI .SH Description .SP 5 5 Throw can be used to send an arbitrary value to an enclosing catch() statement. If you want to raise a general error message, see error(), as that will behave better if it is not caught. Control is transfered directly to the enclosing catch() statement, and the value of the catch() statement is the value thrown. .EP .SH Example string err; int rc; err = catch(rc = ob->move(dest)); if (err) { throw("move.c: ob->move(dest): " + err + "\\n"); return; } .SH See also .SI 5 catch(), error(), error_handler() .EI