我在 IDL(test.idl) 文件中有一种方法:
bool login(in string name, in string cipher) raises (AuthenticationException);
AuthenticationException 在我的 IDL 文件中被声明为异常。然后我使用 tao_idl 生成具有以下参数的骨架:
-Wb,stub_export_macro=BASE_STUB_Export -Wb,stub_export_include=base_stub_export.h -Wb,skel_export_macro=BASE_SKEL_Export -Wb,skel_export_include=base_skel_export.h -GC
但是,testS.h 中生成的登录方法是这样的:
virtual ::project::UserContext * login (
const char * name,
const char * cipher) = 0;
和testI.h:
virtual
::project::UserContext * login (
const char * name,
const char * cipher);
这对我来说很奇怪。因为方法声明缺少 AuthenticationException 异常。我相信该方法应该是这样的: login(..) throw(AuthenticationException) 在业务逻辑中抛出自定义异常,而不是 CORBA 标准异常,并且客户端存根可以捕获这些异常。
我的 tao_idl 参数有问题吗?