aboutsummaryrefslogtreecommitdiffstats
path: root/src/exception.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/exception.hpp')
-rw-r--r--src/exception.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/exception.hpp b/src/exception.hpp
index 815fd1d4..41e113ac 100644
--- a/src/exception.hpp
+++ b/src/exception.hpp
@@ -415,6 +415,22 @@ public:
};
+/** Illegal operation: cannot run this operation on the object.
+ */
+
+class illegal_operation : public messaging_exception
+{
+public:
+
+ illegal_operation(const string& msg = "")
+ : messaging_exception(msg.empty()
+ ? "Illegal operation."
+ : "Illegal operation: " + msg + "."
+ ) {}
+ ~illegal_operation() throw() {}
+};
+
+
/** Command error: operation failed (this is specific to the underlying protocol).
*/