COIN-OR::LEMON - Graph Library

Changeset 1213:6cc106135d31 in lemon-0.x


Ignore:
Timestamp:
03/11/05 17:44:20 (15 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1633
Message:

Solve conflict.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/error.h

    r1209 r1213  
    325325  };
    326326
    327   class IOLogicError : public IOError, public LogicError {
     327  class IOParameterError : public LogicError {
    328328  protected:
    329329    ExceptionMember<std::string> _message;
    330330    ExceptionMember<std::string> _file;
    331     int _line;
    332331
    333332    mutable ExceptionMember<std::string> _message_holder;
    334333  public:
    335334
    336     IOLogicError(const IOLogicError &ile) :
    337       IOError(ile), LogicError(ile),
    338       _message(ile._message), _file(ile._file) {}
    339 
    340     ///\e
    341     explicit IOLogicError(const char *the_message)
    342       : _message(the_message), _line(0) {}
    343 
    344     ///\e
    345     IOLogicError(const char *file_name, const char *the_message)
     335    IOParameterError(const IOParameterError &ile) :
     336      LogicError(ile), _message(ile._message), _file(ile._file) {}
     337
     338    ///\e
     339    explicit IOParameterError(const char *the_message)
     340      : _message(the_message) {}
     341
     342    ///\e
     343    IOParameterError(const char *file_name, const char *the_message)
    346344      : _message(file_name), _file(file_name) {}
    347345
     
    385383
    386384    virtual const char* exceptionName() const {
    387       return "lemon::IOLogicError";
    388     }
    389 
    390     virtual ~IOLogicError() throw() {}
     385      return "lemon::IOParameterError";
     386    }
     387
     388    virtual ~IOParameterError() throw() {}
    391389  };
    392390
     
    400398    const char *function;
    401399    const char *message;
     400
     401    mutable ExceptionMember<std::string> _message_holder;
    402402  public:
    403403    ///\e
     
    427427        ostr << message;
    428428        if( assertion )
    429           ostr << " (assertion '" << assertion << "' failed)";
     429           ostr << " (assertion '" << assertion << "' failed)";
     430        _message_holder.set(ostr.str());
    430431        return ostr.str().c_str();
    431432      }
    432433      catch(...) {}
     434      if( _message_holder.valid() ) return _message_holder.get().c_str();
    433435      return exceptionName();
    434436    }
Note: See TracChangeset for help on using the changeset viewer.