ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Syncify/Error.hpp
(Generate patch)

Comparing:
Spectre2/Error.hpp (file contents), Revision 428 by douglas, 2005-03-24T17:38:00-08:00 vs.
Syncify/Error.hpp (file contents), Revision 440 by douglas, 2005-04-07T22:53:00-07:00

# Line 1 | Line 1
1 < // Spectre 2
1 > // Syncify
2   //
3   // Douglas Thrift
4   //
# Line 16 | Line 16
16   #include <menes-api/error.hpp>
17  
18   #include <errno.h>
19 + #include <libsmbclient.h>
20  
21   struct MENES_DECLARE ApiTraits : public api::ErrorTraits<int>
22   {
23          static const unsigned ErrorBase = 10;
24          static const char* GetName() { return "SMBC"; }
25          static ErrorCode GetLastError() { return errno; }
26 +        // XXX: doesn't actually give anything useful
27          static ext::String GetMessage(const ErrorCode& code)
28          {
29                  char buffer[1024];
# Line 45 | Line 47 | _finline int CheckError(int status)
47          return status;
48   }
49  
50 + _finline ::SMBCCTX* CheckError(::SMBCCTX* result)
51 + {
52 +        if (result == NULL)
53 +                throw Error();
54 +        return result;
55 + }
56 +
57   #endif//_Error_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines