MlError does not override what()
This commit is contained in:
parent
cd8838c37d
commit
858db14e6d
6
ml.cpp
6
ml.cpp
|
|
@ -633,10 +633,6 @@ std::string MlError::description() const {
|
|||
"error: the expression `" + cause->debug() + "` with message \"" + msg + "\"";
|
||||
}
|
||||
|
||||
const char* MlError::what() const noexcept {
|
||||
return ("error: the expression `" + cause->debug() + "` with message \"" + msg + "\"").c_str();
|
||||
}
|
||||
|
||||
void MlEnvironment::combine(MlEnvironment const &other) {
|
||||
// Normally, I would use the `insert` method of the `map` class,
|
||||
// but it doesn't overwrite previously declared values for keys.
|
||||
|
|
@ -2130,7 +2126,7 @@ int main(int argc, char *argv[]) {
|
|||
return 0;
|
||||
|
||||
} catch (MlError &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
std::cerr << e.description() << std::endl;
|
||||
} catch (const std::exception &e) {
|
||||
std::cerr << MlPerfMon::instance().callstack() << e.what() << std::endl;
|
||||
MlPerfMon::instance().clear_callstack();
|
||||
|
|
|
|||
Loading…
Reference in New Issue