-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetMessage() of AWSError class is hidden by Windows preprocessor statement #402
Comments
I'm not giving windows the satisfaction of changing a perfectly good function name just because they don't have a good way of handling unicode. ;) We just undef if.
…Sent from my iPhone
On Jan 5, 2017, at 3:50 AM, dkarantonis ***@***.***> wrote:
Hi,
i am trying to use the following code:
std::cout << "Error while putting Object " << putObjectOutcome.GetError().GetExceptionName() << " " << putObjectOutcome.GetError().GetMessage() << std::endl;
to print a possible error after PutObjects fails, but GetMessage is hidden by system WinUser.h preprocessor statement:
#define GetMessage GetMessageW
In order for this to work, i have used the following workaround before calling AWSError GetMessage():
#undef GetMessage
and then the compiler recognizes the AWSError GetMessage() correctly.
Do you have any better solution to propose on this?
thanks,
Dimitris
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok, thanks! |
For future searches and assist, a very similar issue exists, with similar fix, for
The workaround is the same: This is how my include appears: #include <windows.h>
#undef GetMessage // workaround for AWSError method GetMessage()
#undef GetObject // workaround for Aws::S3::S3Client::GetObject |
ihnorton
added a commit
to ihnorton/TileDB
that referenced
this issue
Jan 13, 2020
ihnorton
added a commit
to ihnorton/TileDB
that referenced
this issue
Jan 13, 2020
ihnorton
added a commit
to TileDB-Inc/TileDB
that referenced
this issue
Jan 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i am trying to use the following code:
std::cout << "Error while putting Object " << putObjectOutcome.GetError().GetExceptionName() << " " << putObjectOutcome.GetError().GetMessage() << std::endl;
to print a possible error after PutObjects fails, but GetMessage is hidden by system WinUser.h preprocessor statement:
#define GetMessage GetMessageW
In order for this to work, i have used the following workaround before calling AWSError GetMessage():
#undef GetMessage
and then the compiler recognizes the AWSError GetMessage() correctly.
Do you have any better solution to propose on this?
thanks,
Dimitris
The text was updated successfully, but these errors were encountered: