ERRMES$

Contents


errmes$ returns an error message.

 

Syntax

   errmes$( exp_num )

 

Parameters

Element

Description

Restrictions

exp_num

Any numerical expression.

exp_num >= 0

 

Examples

   # Division by 0 test
    Onerrgo ERREUR
    Z = X / Y
    End
 
    $ERREUR
       Errbox errmes$(errn)-"on line"-errl
    Resume
   # File open with error management
    NUM_ERR = 0
    Onerrgo PB_OUVERTURE
    Openi filpath("TXT","TEXTE","txt")
    If NUM_ERR <> 0 Then End : Endif
   # continuation of routine
   # ...
    End
   #
   # Error management
    $PB_OUVERTURE 
       Errbox errmes$(errn)
       NUM_ERR = errn
    Resume :# return to line after the error

 

Description and comments

The function errmes$ returns an error message corresponding to the number of the error given in the argument. It is normally called during error management in a routine, with the number of the error generated being accessible by the errn function.

The result is a Char type.

 

Comment

In order to understand the cause of the error better, the errm function may be used.

The list of errors and error codes is given in the programming manual annexes.

 

Associated errors

Error

Description

ERDOM (50)

The argument is negative.

ERMODE (10)

The argument is not a numerical type.

 

Associated key words

MESS - ERRN - ERRL - ONERRGO - ERRBOX - ERRM


CONTENTS

 

 


Copyright © Sage 1999 - 2007