summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Exception.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2006-02-21 02:17:16 +0000
committerMichi Henning <michi@zeroc.com>2006-02-21 02:17:16 +0000
commit2bd1d1b7c21b50d1f643962bcd1c44fb94dee44f (patch)
tree78fa7550ce16ede027333c9e12b2b571d5fbf154 /cpp/src/IceUtil/Exception.cpp
parentFixed Equals() so it can't throw an exception. (diff)
downloadice-2bd1d1b7c21b50d1f643962bcd1c44fb94dee44f.tar.bz2
ice-2bd1d1b7c21b50d1f643962bcd1c44fb94dee44f.tar.xz
ice-2bd1d1b7c21b50d1f643962bcd1c44fb94dee44f.zip
Bug 867.
Diffstat (limited to 'cpp/src/IceUtil/Exception.cpp')
-rw-r--r--cpp/src/IceUtil/Exception.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index 038bf203a14..1d02ef092e3 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -111,3 +111,42 @@ IceUtil::NullHandleException::ice_throw() const
{
throw *this;
}
+
+IceUtil::IllegalArgumentException::IllegalArgumentException(const char* file, int line) :
+ Exception(file, line)
+{
+}
+
+IceUtil::IllegalArgumentException::IllegalArgumentException(const char* file, int line, const string& r) :
+ Exception(file, line),
+ reason(r)
+{
+}
+
+const char* IceUtil::IllegalArgumentException::_name = "IceUtil::IllegalArgumentException";
+
+const string
+IceUtil::IllegalArgumentException::ice_name() const
+{
+ return _name;
+}
+
+IceUtil::Exception*
+IceUtil::IllegalArgumentException::ice_clone() const
+{
+ return new IllegalArgumentException(*this);
+}
+
+void
+IceUtil::IllegalArgumentException::ice_throw() const
+{
+ throw *this;
+}
+
+ostream&
+IceUtil::operator<<(ostream& out, const IceUtil::IllegalArgumentException& ex)
+{
+ ex.ice_print(out);
+ out << ": " << ex.reason;
+ return out;
+}