Unidata/netcdf-cxx4 — pull request #1 by jarlela (2013-12-09 09:40:16+00:00)
Title: NcException: changed member variables to std::string*

These changes to the NcException class will address two issues:
1: Member function what() returned a const char* to a locally declared string variable. The returned pointer was a dangeling pointer as the string variable will be destructed when the function returns.
2: Construction of string variables can throw exceptions. Using strings as membervariables in NcException could result in the constructor throwing in certain cases.

To avoid the possibility of the NcException constructor throwing, the member variables have been changed to a single string*. If an exception is thrown in the construction of the message string it will be caught in the NcException constructor and not propagate further. This will also resolve the first issue as the what() function now returns a const char* to a non local string.