ERRL

Contents


errl is used to give the line number of an error or an interrupt generated when an Adonix routine is run.

 

Syntax

   errl

 

Examples

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

 

Description and comments

errl returns the line number of a routine generating an error on execution or interrupted by the interrupt key.

The result is an Integer type.

 

Comments

This line number in the routine execution has a meaning in a management sub-programme:

·         for errors called by Onerrgo,

·         for interrupts called by Onintgo,

in other cases, its value has no meaning.

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

 

Associated key words

ERRN - ONERRGO - ONINTGO - ERRBOX - ERRMES$ - ERRM


CONTENTS


Copyright © Sage 1999 - 2007