SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

FATAL ERROR

Name:
    FATAL ERROR (SET)
Type:
    Set Subcommand
Purpose:
    Specify the action to take when an error is encountered.
Description:
    By default, Dataplot simply continues to the next command when an error is returned from a Dataplot command.

    You can change the default behaviour with the SET FATAL ERROR command. Specifically, you can tell Dataplot to exit when an error is returned or you can have Dataplot prompt you for what action to take.

    This command can be helpful when debugging Dataplot macros by allowing you to determine where errors are occuring. This is typically not an issue when running Dataplot interactively or running short macros. However, it can be helpful with longer more complicated macros.

Syntax 1:
    SET FATAL ERROR <IGNORE/PROMPT/TERMINATE>

    Specifying TERMINATE means that Dataplot will exit if an error is encountered on a subsequent Dataplot command. Specifying PROMPT means that Dataplot will prompt whether you want to continue or exit Dataplot if an error is encountered on a subsequent Dataplot command. Specifying IGNORE resets the default Dataplot behaviour of simply continuing to the next command.

    Any argument other than PROMPT or TERMINATE will be treated as equivalent to IGNORE (for example, SET FATAL ERROR DEFAULT).

Syntax 2:
    SET WARNING ERROR <IGNORE/PROMPT/TERMINATE>

    This has the same actions as for the SET FATAL ERROR in Syntax 1.

    Currently, this option has no effect as there is currently no distinction between fatal and warning errors. However, this option is being reserved for future use in that this distinction may be implemented in subsequent implementations of Dataplot.

Examples:
    SET FATAL ERROR PROMPT
    SET FATAL ERROR TERMINATE
    SET FATAL ERROR IGNORE
Note:
    Using the following commands can also be helpful when debugging macros.

      ECHO ON
      CAPTURE SCREEN ON
      CAPTURE JUNK.OUT

    The ECHO command encloses entered commands in a box of asterisks. The CAPTURE command directs the output from Dataplot commands to an external file. The CAPTURE SCREEN ON specifies that the output will be written to both the screen and the external file when the CAPTURE command is in effect.

Note:
    If an error is encountered while running a macro and this setting is PROMPT, then Dataplot will print a traceback of the macros that have been called. This can be useful for nested macros (i.e., macros called from within other macros).
Default:
    IGNORE is the default.
Synonyms:
    EXIT, STOP, HALT, and QUIT are synonyms for TERMINATE
Related Commands:
    ECHO = Enclose entered Dataplot commands in a box of asterisks.
    CAPTURE = Direct Dataplot output to an external file.
Applications:
    Debugging Macros
Implementation Date:
    2007/04
    2014/03: Added support for traceback of macros in PROMPT mode
Program 1:
     
    echo on
    set fatal error prompt
    .
    set capture screen on
    capture error.out
    plot y
    lowess y
    .
    call error2.dp
    .
    frequency plot y
    end of capture
        
    The following output is generated
           **************
           **  plot y  **
           **************
      
     ***** ERROR IN CHECKN AS CALLED FROM DPPLO1  --
           A VARIABLE, PARAMETER, OR MATRIX NAME USED (OR NEEDED)
           IN A COMMAND OR AN EXPRESSION WAS NOT FOUND IN THE CURRENT
           LIST OF AVAILABLE PARAMETER AND VARIABLE NAMES.
      
           THE VARIABLE OR PARAMETER IN QUESTION WAS Y
      
      
     ***** ERROR ENCOUNTERED IN: MAINGR
           ICASE = NOVE
           COMMAND = plot y
           CALLED FROM: error.dp
      
           ENTER THE FOLLOWING:
           1 - EXIT DATAPLOT
           2 - CONTINUE RUNNING DATAPLOT
      
     ***** ERROR CONDITION ENCOUNTERED AT MAIN 8112.
           THE FIRST 8 CHARACTERS OF THE FIRST WORD
           OF THE COMMAND ARE PLOT
           PLEASE REENTER COMMAND LINE.
      
           ****************
           **  lowess y  **
           ****************
      
      
     ***** ERROR IN EXTVAR2--
           A NAME IN THE LIST OF EXTRACTED NAMES INCLUDED A
           NON-EXISTENT NAME OR A NAME OF THE WRONG TYPE.
           THE NAME IN QUESTION WAS Y        AND IS OF TYPE NONE
      
     ***** ERROR ENCOUNTERED IN: MAINAN
           ICASE = LOWF
           COMMAND = lowess y
           CALLED FROM: error.dp
      
           ENTER THE FOLLOWING:
           1 - EXIT DATAPLOT
           2 - CONTINUE RUNNING DATAPLOT
      
           *********
           **  .  **
           *********
      
      
           **********************
           **  call error2.dp  **
           **********************
      
      
           *******************************************************************
           **  . This is the "error2.dp" macros called in Program 1 above.  **
           *******************************************************************
      
      
           *********
           **  .  **
           *********
      
      
           *******************
           **  histogram y  **
           *******************
      
      
     ***** ERROR IN EXTVAR2--
           A NAME IN THE LIST OF EXTRACTED NAMES INCLUDED A
           NON-EXISTENT NAME OR A NAME OF THE WRONG TYPE.
           THE NAME IN QUESTION WAS Y        AND IS OF TYPE NONE
      
     ***** ERROR ENCOUNTERED IN: MAINGR
           ICASE = HIST
           COMMAND = histogram y
           CALLED FROM: error.dp
           CALLED FROM: error2.dp
      
           ENTER THE FOLLOWING:
           1 - EXIT DATAPLOT
           2 - CONTINUE RUNNING DATAPLOT
      
     ***** ERROR CONDITION ENCOUNTERED AT MAIN 8112.
           THE FIRST 8 CHARACTERS OF THE FIRST WORD
           OF THE COMMAND ARE HISTOGRA
           PLEASE REENTER COMMAND LINE.
      
           *********
           **  .  **
           *********
      
      
           ************************
           **  frequency plot y  **
           ************************
      
      
     ***** ERROR IN EXTVAR2--
           A NAME IN THE LIST OF EXTRACTED NAMES INCLUDED A
           NON-EXISTENT NAME OR A NAME OF THE WRONG TYPE.
           THE NAME IN QUESTION WAS Y        AND IS OF TYPE NONE
      
     ***** ERROR ENCOUNTERED IN: MAINGR
           ICASE = FREQ
           COMMAND = frequency plot y
           CALLED FROM: error.dp
      
           ENTER THE FOLLOWING:
           1 - EXIT DATAPLOT
           2 - CONTINUE RUNNING DATAPLOT
      
     ***** ERROR CONDITION ENCOUNTERED AT MAIN 8112.
           THE FIRST 8 CHARACTERS OF THE FIRST WORD
           OF THE COMMAND ARE FREQUENC
           PLEASE REENTER COMMAND LINE.
        
Program 2:
     
    . This is the "error2.dp" macros called in Program 1 above.
    .
    histogram y
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 01/31/2015
Last updated: 06/07/2016

Please email comments on this WWW page to alan.heckert@nist.gov.