ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/GoogleTron/Subversion/Error.hpp
Revision: 698
Committed: 2006-03-12T19:28:22-08:00 (19 years, 3 months ago) by douglas
File size: 840 byte(s)
Log Message:
Woo!

File Contents

# Content
1 // Subversion Error
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Subversion_Error_hpp_
8 #define _Subversion_Error_hpp_
9
10 #include <cxx/platform.hpp>
11
12 #ifdef MENES_PRAGMA_ONCE
13 #pragma once
14 #endif
15
16 #include <api/error.hpp>
17
18 #include <subversion-1/svn_error.h>
19
20 namespace Subversion
21 {
22
23 struct ApiTraits : public api::ErrorTraits< ::apr_status_t >
24 {
25 static const unsigned ErrorBase = 10;
26
27 static const char *GetName()
28 {
29 return "Subversion";
30 }
31
32 static ErrorCode GetLastError()
33 {
34 throw ext::NotImplementedException();
35 }
36
37 static cse::String GetMessage(const ErrorCode &code)
38 {
39 char message[1024];
40
41 return ::svn_strerror(code, message, sizeof (message));
42 }
43 };
44
45 typedef api::ErrorImpl<ApiTraits> Error;
46
47 _finline void CheckError(::svn_error_t *status)
48 {
49 if (status)
50 throw Error(status->apr_err);
51 }
52
53 }
54
55 #endif//_Subversion_Error_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id