Update of /cvsroot/objecthandler/ObjectHandler/oh
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23368/oh
Modified Files:
logger.cpp objecthandler.hpp utilities.cpp
Log Message:
support for right-clicking in cell to see error message
Index: utilities.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** utilities.cpp 17 Jul 2006 10:11:39 -0000 1.13
--- utilities.cpp 31 Aug 2006 11:00:46 -0000 1.14
***************
*** 43,53 ****
const std::string &message,
const int &level) {
! // addins call this function from within their catch()
! // so this function must not throw
! try {
! if (level == 2) // loglevel 2 = error message
! ObjectHandler::instance().setLastErrorMessage(message);
! Logger::instance().logMessage(message, level);
! } catch (...) {}
}
--- 43,47 ----
const std::string &message,
const int &level) {
! Logger::instance().logMessage(message, level);
}
Index: objecthandler.hpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/oh/objecthandler.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** objecthandler.hpp 27 Jul 2006 09:37:35 -0000 1.11
--- objecthandler.hpp 31 Aug 2006 11:00:46 -0000 1.12
***************
*** 98,113 ****
virtual const std::vector < std::string > listObjectIDs(
const std::string regex = "");
-
- void setLastErrorMessage(const std::string &message) {
- lastErrorMessage_ = message;
- }
- const std::string &lastErrorMessage() {
- return lastErrorMessage_;
- }
//@}
protected:
static ObjectHandler *instance_;
void checkName(const std::string &objectID);
- std::string lastErrorMessage_;
};
--- 98,105 ----
Index: logger.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/oh/logger.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** logger.cpp 31 May 2006 09:44:14 -0000 1.8
--- logger.cpp 31 Aug 2006 11:00:46 -0000 1.9
***************
*** 1,5 ****
/*
! Copyright (C) 2005 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
--- 1,5 ----
/*
! Copyright (C) 2005, 2006 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
***************
*** 112,115 ****
--- 112,117 ----
const std::string &message,
const int &level) {
+ // client applications call this function from within their
+ // catch() clauses so this function must not throw.
try {
switch (level) {
***************
*** 129,140 ****
LOG4CXX_DEBUG(_logger, message);
break;
- default:
- ostringstream err;
- err << "Logger::logMessage: invalid level: " << level;
- throw Exception(err.str());
}
! } catch (helpers::Exception &e) {
! throw Exception("Logger::logMessage: error writing to log file: " + e.getMessage());
! }
}
--- 131,136 ----
LOG4CXX_DEBUG(_logger, message);
break;
}
! } catch (...) {}
}
|