1
0

id3_error.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // The authors have released ID3Lib as Public Domain (PD) and claim no copyright,
  2. // patent or other intellectual property protection in this work. This means that
  3. // it may be modified, redistributed and used in commercial and non-commercial
  4. // software and hardware without restrictions. ID3Lib is distributed on an "AS IS"
  5. // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
  6. //
  7. // The ID3Lib authors encourage improvements and optimisations to be sent to the
  8. // ID3Lib coordinator, currently Dirk Mahoney ([email protected]). Approved
  9. // submissions may be altered, and will be included and released under these terms.
  10. //
  11. // Mon Nov 23 18:34:01 1998
  12. #ifndef ID3LIB_ERROR_H
  13. #define ID3LIB_ERROR_H
  14. #include "id3_types.h"
  15. enum ID3_Err
  16. {
  17. ID3E_NoMemory = 0,
  18. ID3E_NoData,
  19. ID3E_NoBuffer,
  20. ID3E_InvalidFrameID,
  21. ID3E_FieldNotFound,
  22. ID3E_UnknownFieldType,
  23. ID3E_TagAlreadyAttached,
  24. ID3E_InvalidTagVersion,
  25. ID3E_NoFile,
  26. ID3E_zlibError
  27. };
  28. class ID3_Error
  29. {
  30. public:
  31. ID3_Err GetErrorID(void);
  32. //char *GetErrorDesc(void);
  33. char *GetErrorFile(void);
  34. luint GetErrorLine(void);
  35. // *** PRIVATE INTERNAL DATA - DO NOT USE *** PRIVATE INTERNAL DATA - DO NOT USE ***
  36. ID3_Error(ID3_Err id, char *file, luint lineNum);
  37. protected:
  38. ID3_Err error;
  39. luint errLine;
  40. char errFile[256];
  41. };
  42. #ifdef _DEBUG
  43. //#define ID3_THROW(x) throw ID3_Error (x, __FILE__, __LINE__)
  44. #define ID3_THROW(x) void()
  45. #else
  46. #define ID3_THROW(x) void()
  47. #endif
  48. #endif