We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After the Exception code cleanup PR #742 the error messages streamed into NTA_THROW no longer work.
try { NTA_THROW << "This error msg"; } catch (const Exception &e) { EXPECT_STREQ(e.getMessage(), "This error msg"); }
I added this to the end of ExceptionTest.hpp and it fails. e.getMessage() is empty. Tried this on Windows 10 using MSVC 2019.
But what I really want is something like: e.what() to return
e.what()
Exception: <full path to module>(<line number>) message: <message goes here>
It is not obvious to me what changed that broke it.
The text was updated successfully, but these errors were encountered:
Thanks David for finding this and sorry for the bug!
Sorry, something went wrong.
Found the problem. The copy constructor should be something like:
Exception(const Exception& copy): std::runtime_error("") { filename_ = copy.filename_; lineno_ = copy.lineno_; message_ = copy.getMessage(); // will add in the streamed fields stackTrace_ = copy.stackTrace_; }
Could use std::move( ) on those assignments I guess but this is not a high use function.
No branches or pull requests
After the Exception code cleanup PR #742 the error messages streamed into NTA_THROW no longer work.
I added this to the end of ExceptionTest.hpp and it fails. e.getMessage() is empty.
Tried this on Windows 10 using MSVC 2019.
But what I really want is something like:
e.what()
to returnIt is not obvious to me what changed that broke it.
The text was updated successfully, but these errors were encountered: