Cirrus Logic CS485 Specifiche Pagina 53

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 319
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 52
Error Handling
3-17
3
Example 3-4 A Simple Error Handler
IPLStatus ownError(IPLStatus status, const char *func,
const char *context, const char *file, int line);
{
fprintf(stderr, "IPL Library error: %s, ", iplErrorStr(status));
fprintf(stderr, "function %s, ", func ? func : "<unknown>");
if (line > 0) fprintf(stderr, "line %d, ", line);
if (file != NULL) fprintf(stderr, "file %s, ", file);
if (context) fprintf(stderr, "context %s\n", context);
IplSetErrStatus(status);
exit(1);
}
main () {
extern IPLErrorCallBack ownError;
/* Redirect errors to your own error handler */
iplRedirectError( ownError);
/* Redirect errors back to the default error handler */
iplRedirectError(NULL);
}
Vedere la pagina 52
1 2 ... 48 49 50 51 52 53 54 55 56 57 58 ... 318 319

Commenti su questo manuale

Nessun commento