HError.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*****************************************************************************
  2. * HError.h
  3. *****************************************************************************
  4. *
  5. * Project: HALCON/libhalcon
  6. * Description: Error messages
  7. *
  8. * (c) 1996-2020 by MVTec Software GmbH
  9. * www.mvtec.com
  10. *
  11. *****************************************************************************
  12. *
  13. *
  14. */
  15. #ifndef HERROR_H
  16. #define HERROR_H
  17. #if defined(__cplusplus)
  18. extern "C" {
  19. #endif
  20. extern HLibExport Herror HSetExtendedErrorInfo(Hproc_handle ph,
  21. INT4_8 error_code,
  22. char const* error_message);
  23. #if defined(__GNUC__) || defined(__clang__)
  24. /*
  25. * Tell gcc/clang that HSetExtendedErrorInfoF takes a printf-like format
  26. * string, allowing the compiler to check if the arguments match the format.
  27. */
  28. __attribute__((format(printf, 3, 4)))
  29. #endif
  30. extern HLibExport Herror
  31. HSetExtendedErrorInfoF(Hproc_handle ph, INT4_8 error_code,
  32. char const* error_message, ...);
  33. extern HLibExport Herror HClearExtendedErrorInfo(Hproc_handle ph);
  34. extern HLibExport Herror HSetErrText(char* text);
  35. extern HLibExport Herror HErrText(Herror message, char* err_text);
  36. extern HLibExport Herror HErrorMessage(Herror message, char* msg_text);
  37. #if defined(__cplusplus)
  38. }
  39. #endif
  40. #endif