25#ifndef SVNXX_EXCEPTION_HPP
26#define SVNXX_EXCEPTION_HPP
96 virtual const char* what()
const noexcept override
111using error_ptr = std::shared_ptr<svn_error_t>;
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;
244 virtual const char* what()
const noexcept override;
Exception type that will be thrown when memory allocation fails.
Thrown instead of Error when the error chain contains a SVN_ERR_CANCELLED error code.
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.
User code should throw this exception from callbacks to cancel an operation.
Subversion's data types (common implementation)