summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Exception.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2009-12-04 06:51:23 +0100
committerJose <jose@zeroc.com>2009-12-04 06:51:23 +0100
commit0ad40835182795b5f9bedeea10aeb6f07c666e7d (patch)
tree5dff55b02aefb5854a972eb2cef128d1537d5c47 /cpp/src/IceUtil/Exception.cpp
parentBug 4408 - plugin does not work with x64 only installation (diff)
downloadice-0ad40835182795b5f9bedeea10aeb6f07c666e7d.tar.bz2
ice-0ad40835182795b5f9bedeea10aeb6f07c666e7d.tar.xz
ice-0ad40835182795b5f9bedeea10aeb6f07c666e7d.zip
4089 - IceGrid database corruption.
Diffstat (limited to 'cpp/src/IceUtil/Exception.cpp')
-rw-r--r--cpp/src/IceUtil/Exception.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index 6ce81a17c23..7f33bc497a4 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -401,3 +401,52 @@ IceUtil::SyscallException::error() const
{
return _error;
}
+
+
+IceUtil::FileLockException::FileLockException(const char* file, int line, int err, const string& path):
+ Exception(file, line),
+ _error(err),
+ _path(path)
+{
+}
+
+IceUtil::FileLockException::~FileLockException() throw()
+{
+}
+
+const char* IceUtil::FileLockException::_name = "IceUtil::FileLockedException";
+
+string
+IceUtil::FileLockException::ice_name() const
+{
+ return _name;
+}
+
+void
+IceUtil::FileLockException::ice_print(ostream& os) const
+{
+ Exception::ice_print(os);
+ os << ":\ncould not lock file: `" << _path << "'";
+ if(_error != 0)
+ {
+ os << "\nsyscall exception: " << IceUtilInternal::errorToString(_error);
+ }
+}
+
+IceUtil::Exception*
+IceUtil::FileLockException::ice_clone() const
+{
+ return new FileLockException(*this);
+}
+
+void
+IceUtil::FileLockException::ice_throw() const
+{
+ throw *this;
+}
+
+int
+IceUtil::FileLockException::error() const
+{
+ return _error;
+}