# HG changeset patch # User klao # Date 1110378216 0 # Node ID dc9fdf77007f0c653346a6cdd33bd64b5c98fb45 # Parent f486d30e4e7b52d60bcb0c81097478de2c70cbba Fix a bug noticed by deba. diff -r f486d30e4e7b -r dc9fdf77007f src/lemon/error.h --- a/src/lemon/error.h Wed Mar 09 14:15:22 2005 +0000 +++ b/src/lemon/error.h Wed Mar 09 14:23:36 2005 +0000 @@ -419,7 +419,6 @@ virtual const char* what() const throw() { - const char *mes = 0; try { std::ostringstream ostr; ostr << file << ":" << line << ": "; @@ -428,12 +427,9 @@ ostr << message; if( assertion ) ostr << " (assertion '" << assertion << "' failed)"; - mes = ostr.str().c_str(); - /// \bug Szerintem a 'mes'-re nem szabad hivatkozni, mert - /// az elobb felszabadul. + return ostr.str().c_str(); } catch(...) {} - if( mes ) return mes; return exceptionName(); }