--- trunk/src/utils/StringUtils.hpp 2005/01/12 22:41:40 246 +++ trunk/src/utils/StringUtils.hpp 2005/02/01 22:49:23 278 @@ -112,13 +112,23 @@ namespace oopse { */ template std::string toString(const T& v) { - std::ostringstream oss; - T result; - - oss << v; + std::ostringstream oss; + if (!oss << v) { + std::cerr << "toString Error" << std::endl; + } return oss.str(); } + template + T lexi_cast(const std::string& str) { + T result; + std::istringstream iss; + if (iss >> result) { + std::cerr << "lexi_cast Error" << std::endl; + } + return result; + } + /**@todo need implementation */ std::string getPrefix(const std::string& str);