Solve conflict.
authordeba
Fri, 11 Mar 2005 16:44:20 +0000
changeset 12136cc106135d31
parent 1212 d89e184cc24e
child 1214 39993ada11c7
Solve conflict.
src/lemon/error.h
     1.1 --- a/src/lemon/error.h	Fri Mar 11 16:43:41 2005 +0000
     1.2 +++ b/src/lemon/error.h	Fri Mar 11 16:44:20 2005 +0000
     1.3 @@ -324,25 +324,23 @@
     1.4      virtual ~DataFormatError() throw() {}
     1.5    };
     1.6  
     1.7 -  class IOLogicError : public IOError, public LogicError {
     1.8 +  class IOParameterError : public LogicError {
     1.9    protected:
    1.10      ExceptionMember<std::string> _message;
    1.11      ExceptionMember<std::string> _file;
    1.12 -    int _line;
    1.13  
    1.14      mutable ExceptionMember<std::string> _message_holder;
    1.15    public:
    1.16  
    1.17 -    IOLogicError(const IOLogicError &ile) : 
    1.18 -      IOError(ile), LogicError(ile), 
    1.19 -      _message(ile._message), _file(ile._file) {}
    1.20 +    IOParameterError(const IOParameterError &ile) : 
    1.21 +      LogicError(ile), _message(ile._message), _file(ile._file) {}
    1.22  
    1.23      ///\e 
    1.24 -    explicit IOLogicError(const char *the_message)
    1.25 -      : _message(the_message), _line(0) {}
    1.26 +    explicit IOParameterError(const char *the_message)
    1.27 +      : _message(the_message) {}
    1.28  
    1.29      ///\e 
    1.30 -    IOLogicError(const char *file_name, const char *the_message)
    1.31 +    IOParameterError(const char *file_name, const char *the_message)
    1.32        : _message(file_name), _file(file_name) {}
    1.33  
    1.34       ///\e 
    1.35 @@ -384,10 +382,10 @@
    1.36      }
    1.37  
    1.38      virtual const char* exceptionName() const {
    1.39 -      return "lemon::IOLogicError";
    1.40 +      return "lemon::IOParameterError";
    1.41      }
    1.42  
    1.43 -    virtual ~IOLogicError() throw() {}
    1.44 +    virtual ~IOParameterError() throw() {}
    1.45    };
    1.46  
    1.47  
    1.48 @@ -399,6 +397,8 @@
    1.49      int line;
    1.50      const char *function;
    1.51      const char *message;
    1.52 +
    1.53 +    mutable ExceptionMember<std::string> _message_holder;
    1.54    public:
    1.55      ///\e
    1.56      AssertionFailedError(const char *_file, int _line, const char *func,
    1.57 @@ -426,10 +426,12 @@
    1.58  	  ostr << function << ": ";
    1.59  	ostr << message;
    1.60  	if( assertion )
    1.61 -	  ostr << " (assertion '" << assertion << "' failed)";
    1.62 +	   ostr << " (assertion '" << assertion << "' failed)";
    1.63 +	_message_holder.set(ostr.str());
    1.64  	return ostr.str().c_str();
    1.65        }
    1.66        catch(...) {}
    1.67 +      if( _message_holder.valid() ) return _message_holder.get().c_str();
    1.68        return exceptionName();
    1.69      }
    1.70