Main exception class in firebird
| 90 | |
| 91 | // Main exception class in firebird |
| 92 | class status_exception : public Exception |
| 93 | { |
| 94 | public: |
| 95 | explicit status_exception(const ISC_STATUS *status_vector) throw(); |
| 96 | status_exception(const status_exception&) throw(); |
| 97 | |
| 98 | virtual ~status_exception() throw(); |
| 99 | |
| 100 | virtual void stuffByException(StaticStatusVector& status_vector) const throw(); |
| 101 | virtual const char* what() const throw(); |
| 102 | |
| 103 | const ISC_STATUS* value() const throw() { return m_status_vector; } |
| 104 | |
| 105 | [[noreturn]] static void raise(const ISC_STATUS* status_vector); |
| 106 | [[noreturn]] static void raise(const Arg::StatusVector& statusVector); |
| 107 | [[noreturn]] static void raise(const IStatus* status); |
| 108 | |
| 109 | protected: |
| 110 | // Create exception with undefined status vector, this constructor allows |
| 111 | // derived classes create empty exception ... |
| 112 | status_exception() throw(); |
| 113 | // .. and adjust it later using somehow created status vector. |
| 114 | void set_status(const ISC_STATUS *new_vector) throw(); |
| 115 | |
| 116 | private: |
| 117 | ISC_STATUS* m_status_vector; |
| 118 | ISC_STATUS_ARRAY m_buffer; |
| 119 | |
| 120 | status_exception& operator=(const status_exception&); |
| 121 | }; |
| 122 | |
| 123 | // Parameter syscall later in both system_error & system_call_failed |
| 124 | // must be literal string! This helps avoid need in StringsBuffer |