Update error.h

Add printflike macros to the Error class.
This commit is contained in:
C.W. Betts 2021-03-28 14:37:50 -06:00 committed by GitHub
parent 1973419021
commit 3af624b98e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,11 +43,11 @@ public:
void SetErrno(int err);
void SetSocket(int err);
void SetMessage(const char* msg);
void SetFormattedMessage(const char* format, ...);
void SetFormattedMessage(const char* format, ...) printflike(2, 3);
void SetUser(int err, const char* msg);
void SetUser(const char* code, const char* message);
void SetUserFormatted(int err, const char* format, ...);
void SetUserFormatted(const char* code, const char* format, ...);
void SetUserFormatted(int err, const char* format, ...) printflike(3, 4);
void SetUserFormatted(const char* code, const char* format, ...) printflike(3, 4);
#ifdef _WIN32
void SetWin32(unsigned long err);
void SetHResult(long err);
@ -58,11 +58,11 @@ public:
static Error CreateErrno(int err);
static Error CreateSocket(int err);
static Error CreateMessage(const char* msg);
static Error CreateMessageFormatted(const char* format, ...);
static Error CreateMessageFormatted(const char* format, ...) printflike(1, 2);
static Error CreateUser(int err, const char* msg);
static Error CreateUser(const char* code, const char* message);
static Error CreateUserFormatted(int err, const char* format, ...);
static Error CreateUserFormatted(const char* code, const char* format, ...);
static Error CreateUserFormatted(int err, const char* format, ...) printflike(2, 3);
static Error CreateUserFormatted(const char* code, const char* format, ...) printflike(2, 3);
#ifdef _WIN32
static Error CreateWin32(unsigned long err);
static Error CreateHResult(long err);
@ -94,4 +94,4 @@ private:
TinyString m_message;
};
} // namespace Common
} // namespace Common