|
Subversion
|
Go to the documentation of this file.
25 #ifndef SVNXX_EXCEPTION_HPP
26 #define SVNXX_EXCEPTION_HPP
85 namespace subversion {
96 virtual const char* what()
const noexcept
override
111 using error_ptr = std::shared_ptr<svn_error_t>;
117 class 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;
244 virtual const char* what()
const noexcept
override;
254 #endif // SVNXX_EXCEPTION_HPP
Subversion's data types (common implementation)
Error message description.
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.
const std::string & text() const noexcept
Return the error message.
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.
std::string generic_text() const
Return the generic error message associated with the error code.
const char * name() const noexcept
Return the error name.
virtual std::vector< message > messages() const
Returns the complete list of error messages, including those from nested errors.
User code should throw this exception from callbacks to cancel an operation.
bool trace() const noexcept
Check if this message is in fact a debugging traceback entry.
int code() const noexcept
Return the error code.
virtual std::vector< message > traced_messages() const
Like error::messages(), but includes debugging traceback.
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.