Skip to content
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

Returning local variable from what() member of StandardException and DataException #15

Closed
yichoe opened this issue Apr 8, 2013 · 2 comments · Fixed by #96
Closed

Returning local variable from what() member of StandardException and DataException #15

yichoe opened this issue Apr 8, 2013 · 2 comments · Fixed by #96

Comments

@yichoe
Copy link
Collaborator

yichoe commented Apr 8, 2013

what() members of StandardException and DataException return pointer to string which is created locally. Therefore we can't expect what we'll get from calling.

It need to make what() return basic_string instance as it is or make its instance static.

@stonier
Copy link
Owner

stonier commented Apr 8, 2013

Ah, this might explain the problem I had with it for a long time. On windows it sometimes shows the what(), other times it showed nothing.

Where in the code are you looking at?

@yichoe
Copy link
Collaborator Author

yichoe commented Apr 8, 2013

Maybe I forgot :-) I'm looking at ecl_core/ecl_exceptions in win_porting branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants