Avaya Writing Technician Interface Scripts Manuale Utente Pagina 56

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 116
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 55
Writing Technician Interface Scripts
2-28 117382-A Rev. A
on error
The on error command allows you to specify an error handler label within a script
file. If a command returns an error or if the user attempts to abort the script file,
the script interpreter goes to the error handler label defined in the file. If you press
Ctrl-c to abort the script, the Technician Interface displays the following prompt:
Terminate script file? (y/n):
Syntax
The on error command has the following syntax:
on error [-s] :
<label>
:
-s
allows the script to recover without returning an error message if the on error
command cannot locate a specified file.
<label>
is the name of the error handler label.
Example
In the following script, the script interpreter goes to the label
:ERROR_HANDLER: when an error occurs:
on error :ERROR_HANDLER:
echo “what
echo “this line is skipped due to the above”
echo “syntax error. (Missing quote)”
:ERROR_HANDLER:
echo “The error handler is called because of the”
echo “deliberate syntax error in the previous command.”
The error handler is automatically canceled after an error is found or if you issue
the
on error command without a label.
Vedere la pagina 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 115 116

Commenti su questo manuale

Nessun commento