1
1

warning.hh 670 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * warning.hh for jsonstroller
  3. *
  4. * Author: isundil <isundill@gmail.com>
  5. **/
  6. #pragma once
  7. #include "jsonException.hh"
  8. class Warning
  9. {
  10. public:
  11. Warning(const JsonException &);
  12. ~Warning();
  13. /**
  14. * get exception representing non-blocking error
  15. **/
  16. const JsonException &operator()() const;
  17. /**
  18. * Because of copy, we can't get warning typeinfo
  19. **/
  20. const std::string &getType() const;
  21. /**
  22. * return type of given exception
  23. **/
  24. static std::string getType(const std::exception &);
  25. private:
  26. JsonException what;
  27. std::string type;
  28. };