Command: raiseerror

NEST HelpDesk Command Index NEST Quick Reference

Name:
 raiseerror - raise an error to the system
Synopsis:
 /command /error raiserror -> /command (side-effects see below!)

Description:
   raiseerror is a SLI interface to the interpreter's error
   handling mechanism (see The Red Book for details). If an error
   is raised, the following actions are performed:
   * the value of errordict /newerror is set to true
   * the value of errordict /commandname is set to the name of the
     command which raised the error
   * the name of the command which raised the error is pushed on
     the operand stack.
   * If the value of errordict /recorstack is true,
     the state of the interpreter is saved:
     - the operand stack is copied to errordict /ostack
     - the execution stack is copied to errordict /estack
     - the dictionary stack is copied to errordict /dstack
   * stop is called. Stop then tries to find an enclosing stopped
     context and calls the associated function.

   This mechanism is explained in detail in The PostScript Reference Manual.

   Please note that when raiserror is called, the state of the stacks
   should be restored to its initial state.

Examples:
   /save_sqrt
   {
      0 gt % is the argument positive ?
      {
        sqrt
      }
      { % else, issue an error
        /save_sqrt /PositiveValueExpected raiseerror
      } ifelse
   } def

Bugs:
 lets wait...
Author:
 Gewaltig
Remarks:
 not part of PostScript, but conform to the mechanism
References:
 See the Red Book for PostScript's error handling facilities
SeeAlso:raiseagain stop stopped errordict
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/sli/slicontrol.cc

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative