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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 122
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 61
Writing Technician Interface Scripts
2-28 114089 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):
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.
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 61
1 2 ... 57 58 59 60 61 62 63 64 65 66 67 ... 121 122

Comentários a estes Manuais

Sem comentários