2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-09 13:46:20 +00:00

[1332] detect read attempt and beyond the end of sequence and reject it by

exception.  a new generic exception "InvalidOperation" was introduced.
This commit is contained in:
JINMEI Tatuya
2011-11-14 17:43:20 -08:00
parent dca136175c
commit 94ec743d73
3 changed files with 25 additions and 2 deletions

View File

@@ -126,6 +126,17 @@ public:
isc::Exception(file, line, what) {}
};
/// \brief A generic exception that is thrown if a function is called
/// in a prohibited way.
///
/// For example, this can happen if a class method is called when the object's
/// state does not allow that particular method.
class InvalidOperation : public Exception {
public:
InvalidOperation(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
};
///
/// \brief A generic exception that is thrown when an unexpected
/// error condition occurs.