23 |
|
static const unsigned ErrorBase = 10; |
24 |
|
static const char* GetName() { return "SMBC"; } |
25 |
|
static ErrorCode GetLastError() { return errno; } |
26 |
< |
static ext::String GetMessage(const ErrorCode& code) |
27 |
< |
{ |
28 |
< |
char buffer[1024]; |
29 |
< |
|
30 |
< |
#ifdef __GNUC__ |
31 |
< |
return ext::Buffer(::strerror_r(code, buffer, sizeof (buffer))); |
32 |
< |
#else |
33 |
< |
api::Posix::CheckError(::strerror_r(code, buffer, sizeof (buffer))); |
34 |
< |
#endif |
35 |
< |
|
36 |
< |
return ext::Buffer(buffer); |
37 |
< |
} |
26 |
> |
static ext::String GetMessage(const ErrorCode& code); |
27 |
|
}; |
28 |
|
|
29 |
|
MENES_DECLARE typedef api::ErrorImpl<ApiTraits> Error; |