diff options
author | mayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-07-10 17:17:10 +0000 |
---|---|---|
committer | mayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-07-10 17:17:10 +0000 |
commit | 0e53be37e51b7f64f19c2e675df386d88c3306b8 (patch) | |
tree | fd12097f965292b4bcca7b9d4f0a6f01a299a123 | |
parent | 2ceba457a40ccde5ca90abb9012fccd9339b23f9 (diff) | |
download | ATCD-0e53be37e51b7f64f19c2e675df386d88c3306b8.tar.gz |
Wed Jul 10 10:11:30 2002 Mayur Deshpande <mayur@ics.uci.edu>
-rw-r--r-- | TAO/ChangeLog | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp | 23 |
2 files changed, 22 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 19036fb81dd..259646d907e 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,6 +1,7 @@ Wed Jul 10 10:11:30 2002 Mayur Deshpande <mayur@ics.uci.edu> * TAO_IDL/be/be_visitor_valuetype/arglist.cpp (visit_operation): + We need to throw an exceptions that was assigned in a different place (by the app-developer). ACE_THROW does not fit the bill since the ACE_THROW macro contructs the exception passed to it. diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp index ec188786b49..c4d383b3ae1 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp @@ -105,7 +105,7 @@ be_visitor_obv_operation_arglist::visit_operation (be_operation *node) /***********************************************************/ if (is_amh_exception_holder (node)) { - *os << "ACE_ENV_SINGLE_ARG_DECL_NOT_USED"; + *os << "ACE_ENV_SINGLE_ARG_DECL"; } /***********************************************************/ else @@ -168,7 +168,26 @@ be_visitor_obv_operation_arglist::visit_operation (be_operation *node) /***********************************************************/ if (is_amh_exception_holder (node)) { - *os << "{ this->exception->_raise (); }" + // We need to throw an exceptions that was assigned in a + // different place (by the app-developer). ACE_THROW does + // not fit the bill since the ACE_THROW macro contructs the + // exception passed to it. Also exception->raise_() is + // ruled out since in platforms without native exception + // support, the raise() function does not do anything. What + // is left as an alternative is tthe hack below where we + // explicitly take care of both the cases (platforms with + // and without native exception support). + *os << be_nl + << "{" << be_nl + << "#if defined (TAO_HAS_EXCEPTIONS)" << be_idt_nl + << "auto_ptr<CORBA::Exception> safety (exception);" << be_nl + << "// Direct throw because we don't have the ACE_TRY_ENV." << be_nl + << "exception->_raise ();" << be_uidt_nl + << "#else" << be_idt_nl + << "// We can not use ACE_THROW here." << be_nl + << "ACE_TRY_ENV.exception (this->exception);" << be_uidt_nl + << "#endif" << be_nl + << "}" << be_uidt_nl; } /***********************************************************/ |