jsonException.hh 589 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <exception>
  3. class EofException: std::exception
  4. { };
  5. class JsonException: std::exception
  6. {
  7. public:
  8. JsonException(unsigned long long offset);
  9. protected:
  10. const unsigned long long offset;
  11. };
  12. class JsonFormatException: JsonException
  13. {
  14. public:
  15. JsonFormatException(char character, unsigned long long offset);
  16. const char *what() const noexcept;
  17. protected:
  18. const char c;
  19. };
  20. class JsonEscapedException: JsonFormatException
  21. {
  22. public:
  23. JsonEscapedException(char character, unsigned long long offset);
  24. };