You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
561 B

1 year ago
  1. #pragma once
  2. #include <exception>
  3. #include <string>
  4. namespace std _GLIBCXX_VISIBILITY(default) {
  5. class zexception : public exception {
  6. string m_ecodeinfo = "";
  7. int32_t m_ecode = 0;
  8. public:
  9. /** Takes a character string describing the error. */
  10. explicit zexception(int32_t ecode, const string& __arg) {
  11. m_ecodeinfo = __arg;
  12. m_ecode = ecode;
  13. }
  14. const char* what() const noexcept override { return m_ecodeinfo.c_str(); }
  15. int32_t ecode() const noexcept { return m_ecode; }
  16. };
  17. } // namespace std _GLIBCXX_VISIBILITY(default)