// Subversion Error // // Douglas Thrift // // $Id$ #ifndef _Subversion_Error_hpp_ #define _Subversion_Error_hpp_ #include #ifdef MENES_PRAGMA_ONCE #pragma once #endif #include #include namespace Subversion { struct ApiTraits : public api::ErrorTraits< ::apr_status_t > { static const unsigned ErrorBase = 10; static const char *GetName() { return "Subversion"; } static ErrorCode GetLastError() { throw ext::NotImplementedException(); } static cse::String GetMessage(const ErrorCode &code) { char message[1024]; return ::svn_strerror(code, message, sizeof (message)); } }; typedef api::ErrorImpl Error; _finline void CheckError(::svn_error_t *status) { if (status) throw Error(status->apr_err); } } #endif//_Subversion_Error_hpp_