25#ifndef SVNXX_EXCEPTION_HPP
26#define SVNXX_EXCEPTION_HPP
91class allocation_failed :
public std::bad_alloc
94 virtual ~allocation_failed()
noexcept {}
96 virtual const char* what()
const noexcept override
102 explicit allocation_failed(
const char* what_arg) noexcept
111using error_ptr = std::shared_ptr<svn_error_t>;
117class error :
public std::exception,
118 protected detail::error_ptr
130 virtual const char*
what() const noexcept override;
136 virtual
int code() const noexcept;
143 virtual const
char*
name() const noexcept;
154 int code() const noexcept {
return m_errno; }
160 const char*
name() const noexcept {
return m_errname; }
165 const std::string&
text() const noexcept {
return m_message; }
175 bool trace() const noexcept {
return m_trace; }
178 message(
int errval,
const char* errname,
179 const std::string& message_,
bool trace)
188 const char* m_errname;
189 std::string m_message;
199 return compile_messages(
false);
211 return compile_messages(
true);
215 error(detail::error_ptr err);
216 const char*
const m_message;
217 std::vector<message> compile_messages(
bool show_traces)
const;
224class cancelled :
public error
227 virtual ~cancelled() {}
230 cancelled(detail::error_ptr err)
239class stop_iteration :
public std::exception
243 virtual ~stop_iteration() {}
244 virtual const char* what()
const noexcept override;
Error message description.
bool trace() const noexcept
Check if this message is in fact a debugging traceback entry.
const std::string & text() const noexcept
Return the error message.
const char * name() const noexcept
Return the error name.
int code() const noexcept
Return the error code.
std::string generic_text() const
Return the generic error message associated with the error code.
Encapsulate a stack of Subversion error codes and messages.
virtual const char * what() const noexcept override
Returns the message associated with the top-level error that caused the exception.
virtual std::vector< message > traced_messages() const
Like error::messages(), but includes debugging traceback.
virtual std::vector< message > messages() const
Returns the complete list of error messages, including those from nested errors.
virtual const char * name() const noexcept
Returns the symbolic name of the error code associated with the top-level error that caused the excep...
virtual int code() const noexcept
Returns the error code associated with the top-level error that caused the exception.
Subversion's data types (common implementation)