aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/Exception.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/Exception.h')
-rw-r--r--common/rdr/Exception.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/rdr/Exception.h b/common/rdr/Exception.h
index 65d3d90a..c6be8fcc 100644
--- a/common/rdr/Exception.h
+++ b/common/rdr/Exception.h
@@ -26,23 +26,27 @@
namespace rdr {
struct Exception {
- enum { len = 256 };
- char str_[len];
Exception(const char* message);
Exception(const std::string& message);
virtual ~Exception() {}
virtual const char* str() const { return str_; }
+ private:
+ char str_[256];
};
struct PosixException : public Exception {
int err;
PosixException(const char* s, int err_);
+ private:
+ std::string strerror(int err_) const;
};
#ifdef WIN32
struct Win32Exception : public Exception {
unsigned err;
Win32Exception(const char* s, unsigned err_);
+ private:
+ std::string strerror(unsigned err_) const;
};
#endif
@@ -59,6 +63,8 @@ namespace rdr {
struct GAIException : public Exception {
int err;
GAIException(const char* s, int err_);
+ private:
+ std::string strerror(int err_) const;
};
struct EndOfStream : public Exception {