ERRBOX

Contents


Errbox displays an error box.

 

Syntax

   [LocalErrbox  exprg_list  [Titled title_exp] 

 

Parameters

Element

Description

Restrictions

exprg_list

List of generalized expressions separated by the comma (,)

The expressions must be alphanumeric and their number limited to 255.

title_exp

Alphanumeric expression of the box title

length <= 50

 

Examples

   # Opening of a file with error management (you could have
   # tested the existence of the file by the filinfo function)
    FLAG_ERREUR=0
    # If an error occurs, go to the PB_OUVERTURE label
    Onerrgo PB_OUVERTURE
    # Opening of a sequential file
    Openi filpath("TXT","TEST","txt")
    # No more connections to errors, now
    Onerrgo
    If FLAG_ERREUR
       # Stop if an error occurs
           End
    Endif
   #
   # ... continuation of the process ...
   #
   # Label defined in the GESERR process
    PB_OUVERTURE
       Errbox errmes$(errn)
       FLAG_ERREUR = 1
    Resume                 :# Return the error to the next line

 

Description and Comments

Errbox allows you to declare a box used to display an error message.

Use the Errbox instruction to display the messages that correspond to Adonix errors (therefore managed by the Onerrgo instruction) or to manage other errors that belong to the application.

The Errbox instruction includes the text of the message to be displayed as the first parameter. It is given in the form of a list of alphanumeric expressions, each element of the list constituting one line of text. If one of the expressions is a variable that
was sized with no index or index interval precision, then all of the variable's elements are used. The precision of an index or of an index interval determines the elements to be considered. If you give an index interval in such a way that there is no corresponding element, for example TEXTE(1..0), the box will not be displayed.

Text given with a number of lines too large for the size of the screen will be truncated.

Next, you may give optional clauses:

The Titled clause provides a title for the error box - different from the standard title.

 

Remarks

The error boxes are closed as soon as you click on the "OK" button. The Close instruction does not exist for an Errbox.

 

Associated Errors

Error

Description

ERMODE (10)

- The expressions are not alphanumeric.
- The indexes given are not numeric.

ERINDI (8)

Range Error for Indexes

ERDIM (55)

Too many dimensions given

PLUMEM (31)

No more memory available

 

Associated Keywords

ONERRGO - WRNBOX - INFBOX - QSTBOX - SELBOX - INPBOX - DLGBOX - MESBOX


CONTENTS

 


Copyright © Sage 1999 - 2007