ldmud-3.4.1/doc/
ldmud-3.4.1/doc/efun.de/
ldmud-3.4.1/doc/efun/
ldmud-3.4.1/doc/man/
ldmud-3.4.1/doc/other/
ldmud-3.4.1/mud/
ldmud-3.4.1/mud/heaven7/
ldmud-3.4.1/mud/lp-245/
ldmud-3.4.1/mud/lp-245/banish/
ldmud-3.4.1/mud/lp-245/doc/
ldmud-3.4.1/mud/lp-245/doc/examples/
ldmud-3.4.1/mud/lp-245/doc/sefun/
ldmud-3.4.1/mud/lp-245/log/
ldmud-3.4.1/mud/lp-245/obj/Go/
ldmud-3.4.1/mud/lp-245/players/lars/
ldmud-3.4.1/mud/lp-245/room/death/
ldmud-3.4.1/mud/lp-245/room/maze1/
ldmud-3.4.1/mud/lp-245/room/sub/
ldmud-3.4.1/mud/lp-245/secure/
ldmud-3.4.1/mud/morgengrauen/
ldmud-3.4.1/mud/morgengrauen/lib/
ldmud-3.4.1/mud/sticklib/
ldmud-3.4.1/mud/sticklib/src/
ldmud-3.4.1/mudlib/uni-crasher/
ldmud-3.4.1/pkg/
ldmud-3.4.1/pkg/debugger/
ldmud-3.4.1/pkg/diff/
ldmud-3.4.1/pkg/misc/
ldmud-3.4.1/src/autoconf/
ldmud-3.4.1/src/hosts/
ldmud-3.4.1/src/hosts/GnuWin32/
ldmud-3.4.1/src/hosts/amiga/
ldmud-3.4.1/src/hosts/win32/
ldmud-3.4.1/src/ptmalloc/
ldmud-3.4.1/src/util/
ldmud-3.4.1/src/util/erq/
ldmud-3.4.1/src/util/indent/hosts/next/
ldmud-3.4.1/src/util/xerq/
ldmud-3.4.1/src/util/xerq/lpc/
ldmud-3.4.1/src/util/xerq/lpc/www/
ldmud-3.4.1/test/t-030925/
ldmud-3.4.1/test/t-040413/
ldmud-3.4.1/test/t-041124/
SYNOPSIS
        void runtime_error( string err, string prg, string curobj, int line
                          , mixed culprit, int caught)

DESCRIPTION
        This function has to announce a runtime error to the active
        user. If the user has enough privileges, it might give him the
        full error message together with the source line. Else it
        should issue a decent message ("Your sensitive mind notices a
        wrongness in the fabric of space").

        <err> is the error message, <prg> is the program executed (which
        might be an inherited program), <curobj> is the current object at
        the time of the error. <line> is the linenumber within the program.

        If the error is a normal runtime error, <culprit> is -1. Otherwise,
        the error occured during a heartbeat and <culprit> is the object which
        heart_beat() function was executed. Also, in case of a heartbeat error,
        the heartbeat for the <culprit> has been turned off.

        If the error is caught on a higher level, <caught> is non-zero;
        otherwise it is 0.

        Note that any of the the objects or programs might be destructed, ie.
        might be passed as 0.

        One common pitfall in the implementation of runtime_error() is
        that runtime_error() itself could run out of evaluation ticks,
        causing a runtime error itself. The workaround is to use
        limited() like this:

          static void
          handle_runtime_error ( string err, string prg, string curobj
                               , int line)
          { ... the actual error handler ... }

          static void
          call_runtime_error (string err, string prg, string curobj, int line)
          {
              limited(#'handle_runtime_error, ({ 200000 }), err, prg, curobj
                     , line);
          }

          void
          runtime_error (string err, string prg, string curobj, int line)
          {
              limited(#'call_runtime_error, ({ LIMIT_UNLIMITED })
                     , err, prg, curobj, line);
          }


HISTORY
        LDMud 3.2.9 added the <culprit> argument.
        LDMud 3.2.12/3.3.705 added the <caught> argument.


SEE ALSO
        log_error(M), heart_beat_error(M), runtime_warning(M),
        raise_error(E), expand_define(E)