From: Michal Voců Date: Mon, 10 Sep 2007 15:43:08 +0000 (+0000) Subject: remove unnecessary formatMessage function X-Git-Tag: glite-yaim-myproxy_R_4_0_1_1~23 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=6928c50229da25bf0870f570d96f81161284b13d;p=jra1mw.git remove unnecessary formatMessage function --- diff --git a/org.glite.jobid.api-cpp/interface/JobId.h b/org.glite.jobid.api-cpp/interface/JobId.h index 262e0b8..0c9b336 100755 --- a/org.glite.jobid.api-cpp/interface/JobId.h +++ b/org.glite.jobid.api-cpp/interface/JobId.h @@ -24,21 +24,12 @@ public: * \param[in] exception Error message describing the exception. */ JobIdError(std::string const& exception) - : std::runtime_error(formatMessage(exception)) + : std::runtime_error(std::string("JobId: bad argument (") + exception + ")") {} virtual ~JobIdError() throw() {} -private: - /** Format message for this particular exception. - * - * Returns formatted string describing exception. - * \param[in] exception Error message describing the exception. - */ - std::string formatMessage(std::string const& exception) { - return std::string("JobId: bad argument ( ") + exception + ")"; - } }; @@ -201,6 +192,8 @@ JobId::JobId(JobId const& src) int ret = glite_jobid_dup(src.m_jobid, &m_jobid); if(ret) { + // we rely on dup returning only ENOMEM on error + assert(ret == ENOMEM); throw std::bad_alloc(); } }