summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/defaultServant/TestI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/defaultServant/TestI.cpp')
-rw-r--r--cpp/test/Ice/defaultServant/TestI.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/cpp/test/Ice/defaultServant/TestI.cpp b/cpp/test/Ice/defaultServant/TestI.cpp
new file mode 100644
index 00000000000..50d2f49fc1f
--- /dev/null
+++ b/cpp/test/Ice/defaultServant/TestI.cpp
@@ -0,0 +1,45 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+void
+MyObjectI::ice_ping(const Ice::Current& current) const
+{
+ string name = current.id.name;
+
+ if(name == "ObjectNotExist")
+ {
+ throw Ice::ObjectNotExistException(__FILE__, __LINE__);
+ }
+ else if(name == "FacetNotExist")
+ {
+ throw Ice::FacetNotExistException(__FILE__, __LINE__);
+ }
+}
+
+std::string
+MyObjectI::getName(const Ice::Current& current)
+{
+ string name = current.id.name;
+
+ if(name == "ObjectNotExist")
+ {
+ throw Ice::ObjectNotExistException(__FILE__, __LINE__);
+ }
+ else if(name == "FacetNotExist")
+ {
+ throw Ice::FacetNotExistException(__FILE__, __LINE__);
+ }
+
+ return name;
+}