Teledyne-lecroy Automation API for IBTrainer Software Ver.2.0 Instrukcja Użytkownika Strona 15

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 167
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
.
Przeglądanie stron 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 166 167

Komentarze do niniejszej Instrukcji

Brak uwag