Error.h 336 B

1234567891011121314151617181920212223
  1. #ifndef SNUVI_ERROR_H
  2. #define SNUVI_ERROR_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdbool.h>
  7. typedef struct Error {
  8. int line;
  9. char message[256];
  10. } Error;
  11. void eInitError(Error* e, int line, const char* format, ...);
  12. void eInitSuccess(Error* e);
  13. bool eHasError(const Error* e);
  14. #ifdef __cplusplus
  15. }
  16. #endif
  17. #endif