Avaya Writing Technician Interface Scripts Manual do Utilizador Página 58

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 116
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 57
Writing Technician Interface Scripts
2-28
308660-14.00 Rev 00
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.
Vista de página 57
1 2 ... 53 54 55 56 57 58 59 60 61 62 63 ... 115 116

Comentários a estes Manuais

Sem comentários