diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-10-21 22:25:48 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-10-21 22:25:48 +0000 |
commit | 623184c101c904eb0d456d325d3ced4d4475d3ae (patch) | |
tree | 56a4d02eeb1f966ad1f17405a9c6b2fe84e804e0 /cpp/src/Transform/Exception.cpp | |
parent | Freeze Index Windows port (diff) | |
download | ice-623184c101c904eb0d456d325d3ced4d4475d3ae.tar.bz2 ice-623184c101c904eb0d456d325d3ced4d4475d3ae.tar.xz ice-623184c101c904eb0d456d325d3ced4d4475d3ae.zip |
initial check-in
Diffstat (limited to 'cpp/src/Transform/Exception.cpp')
-rw-r--r-- | cpp/src/Transform/Exception.cpp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/cpp/src/Transform/Exception.cpp b/cpp/src/Transform/Exception.cpp new file mode 100644 index 00000000000..dc25832fa9c --- /dev/null +++ b/cpp/src/Transform/Exception.cpp @@ -0,0 +1,60 @@ +// ********************************************************************** +// +// Copyright (c) 2003 +// ZeroC, Inc. +// Billerica, MA, USA +// +// All Rights Reserved. +// +// Ice is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License version 2 as published by +// the Free Software Foundation. +// +// ********************************************************************** + +#include <Transform/Exception.h> + +using namespace std; + +// +// TransformException +// +Transform::TransformException::TransformException(const char* file, int line, const string& reason) : + IceUtil::Exception(file, line), _reason(reason) +{ +} + +string +Transform::TransformException::ice_name() const +{ + return "Transform::TransformException"; +} + +void +Transform::TransformException::ice_print(ostream& out) const +{ + IceUtil::Exception::ice_print(out); + out << ":\nerror occurred during transformation"; + if(!_reason.empty()) + { + out << ":\n" << _reason; + } +} + +IceUtil::Exception* +Transform::TransformException::ice_clone() const +{ + return new TransformException(ice_file(), ice_line(), _reason); +} + +void +Transform::TransformException::ice_throw() const +{ + throw *this; +} + +string +Transform::TransformException::reason() const +{ + return _reason; +} |