From 57dbdb1704d6e1c0ea937bfdf81111cb1c9cad6f Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Wed, 30 Jul 2008 06:28:53 +0000 Subject: Removed errno from a default parameter as I'm not convinced that this is always portable as errno could be a macro git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@680918 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/Exception.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/Exception.h b/qpid/cpp/src/qpid/Exception.h index 4e91f85ddb..c7ddcec109 100644 --- a/qpid/cpp/src/qpid/Exception.h +++ b/qpid/cpp/src/qpid/Exception.h @@ -34,7 +34,7 @@ namespace qpid { /** Get the error message for a system number err, e.g. errno. */ -std::string strError(int err=errno); +std::string strError(int err); /** * Base class for Qpid runtime exceptions. @@ -55,7 +55,8 @@ class Exception : public std::exception /** Exception that includes an errno message. */ struct ErrnoException : public Exception { - ErrnoException(const std::string& msg, int err=errno) : Exception(msg+": "+strError(err)) {} + ErrnoException(const std::string& msg, int err) : Exception(msg+": "+strError(err)) {} + ErrnoException(const std::string& msg) : Exception(msg+": "+strError(errno)) {} }; struct SessionException : public Exception { -- cgit v1.2.1