Teledyne-lecroy Automation API for IBTrainer Software Ver.2.0 Manual de usuario Pagina 15

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 14
Packet Handling Concept Programming the IBTrainer
CATC IBTrainer InfiniBand Exerciser API Reference 1-5
Exception and Error Handling
This section shows the error mechanisms implemented by the C++ and
the TCL interfaces.
Error Mechanisms for the C++ Interface
The following code block shows an example of how to use the exception
handling with the API.
try
{
IGCGenerator myGenerator;
myGenerator.Connect(0);
myGenerator.Foo();
}
catch (IGCError err)
{
// Error occurred in try block
// Do error handling here, e.g. print error message:
cerr << "Error occurred: " << err;
}
To throw an error, use a line similar to the one below:
throw(IGCError(IGCError::IGE_FATAL, "Cannot close device"));
See also the descriptions in
“Methods of the IGCPacketHandler Class”
on page 2-103
and
“EErrtype” on page 3-1
.
Vista de pagina 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 166 167

Comentarios a estos manuales

Sin comentarios