📄 testi.cpp
字号:
// **********************************************************************//// Copyright (c) 2003-2007 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 Test;ThrowerI::ThrowerI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter){}voidThrowerI::shutdown(const Ice::Current&){ _adapter->getCommunicator()->shutdown();}boolThrowerI::supportsUndeclaredExceptions(const Ice::Current&){ return true;}boolThrowerI::supportsAssertException(const Ice::Current&){ return false;}voidThrowerI::throwAasA(Ice::Int a, const Ice::Current&){ A ex; ex.aMem = a; throw ex;}voidThrowerI::throwAorDasAorD(Ice::Int a, const Ice::Current&){ if(a > 0) { A ex; ex.aMem = a; throw ex; } else { D ex; ex.dMem = a; throw ex; }}voidThrowerI::throwBasA(Ice::Int a, Ice::Int b, const Ice::Current& current){ throwBasB(a, b, current);}voidThrowerI::throwCasA(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current& current){ throwCasC(a, b, c, current);}voidThrowerI::throwBasB(Ice::Int a, Ice::Int b, const Ice::Current&){ B ex; ex.aMem = a; ex.bMem = b; throw ex;}voidThrowerI::throwCasB(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current& current){ throwCasC(a, b, c, current);}voidThrowerI::throwCasC(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current&){ C ex; ex.aMem = a; ex.bMem = b; ex.cMem = c; throw ex;}voidThrowerI::throwModA(Ice::Int a, Ice::Int a2, const Ice::Current&){ Mod::A ex; ex.aMem = a; ex.a2Mem = a2; throw ex;}voidThrowerI::throwUndeclaredA(Ice::Int a, const Ice::Current&){ A ex; ex.aMem = a; throw ex;}voidThrowerI::throwUndeclaredB(Ice::Int a, Ice::Int b, const Ice::Current&){ B ex; ex.aMem = a; ex.bMem = b; throw ex;}voidThrowerI::throwUndeclaredC(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current&){ C ex; ex.aMem = a; ex.bMem = b; ex.cMem = c; throw ex;}voidThrowerI::throwLocalException(const Ice::Current&){ throw Ice::TimeoutException(__FILE__, __LINE__);}voidThrowerI::throwNonIceException(const Ice::Current&){ throw int(12345);}voidThrowerI::throwAssertException(const Ice::Current&){ assert(false); // Not supported in C++.}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -