# HG changeset patch # User deba # Date 1110559460 0 # Node ID 6cc106135d3123847fd1b4882570fbd166633795 # Parent d89e184cc24ee7afa68ab183ac0ddd481790297d Solve conflict. diff -r d89e184cc24e -r 6cc106135d31 src/lemon/error.h --- a/src/lemon/error.h Fri Mar 11 16:43:41 2005 +0000 +++ b/src/lemon/error.h Fri Mar 11 16:44:20 2005 +0000 @@ -324,25 +324,23 @@ virtual ~DataFormatError() throw() {} }; - class IOLogicError : public IOError, public LogicError { + class IOParameterError : public LogicError { protected: ExceptionMember _message; ExceptionMember _file; - int _line; mutable ExceptionMember _message_holder; public: - IOLogicError(const IOLogicError &ile) : - IOError(ile), LogicError(ile), - _message(ile._message), _file(ile._file) {} + IOParameterError(const IOParameterError &ile) : + LogicError(ile), _message(ile._message), _file(ile._file) {} ///\e - explicit IOLogicError(const char *the_message) - : _message(the_message), _line(0) {} + explicit IOParameterError(const char *the_message) + : _message(the_message) {} ///\e - IOLogicError(const char *file_name, const char *the_message) + IOParameterError(const char *file_name, const char *the_message) : _message(file_name), _file(file_name) {} ///\e @@ -384,10 +382,10 @@ } virtual const char* exceptionName() const { - return "lemon::IOLogicError"; + return "lemon::IOParameterError"; } - virtual ~IOLogicError() throw() {} + virtual ~IOParameterError() throw() {} }; @@ -399,6 +397,8 @@ int line; const char *function; const char *message; + + mutable ExceptionMember _message_holder; public: ///\e AssertionFailedError(const char *_file, int _line, const char *func, @@ -426,10 +426,12 @@ ostr << function << ": "; ostr << message; if( assertion ) - ostr << " (assertion '" << assertion << "' failed)"; + ostr << " (assertion '" << assertion << "' failed)"; + _message_holder.set(ostr.str()); return ostr.str().c_str(); } catch(...) {} + if( _message_holder.valid() ) return _message_holder.get().c_str(); return exceptionName(); }