summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-04-07 15:20:31 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-04-07 15:20:31 +0000
commit08006f28453a42af24fb9a92d0ef4b7c44f9cc99 (patch)
tree50c2a7b4cf2e7384f171da051a59854bf93d2df3
parent15464ceabb9017c1c44f777b709c44030fb0feca (diff)
downloadATCD-08006f28453a42af24fb9a92d0ef4b7c44f9cc99.tar.gz
ChangeLogTag: Wed Apr 7 15:18:40 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_attribute/component_init.cpp22
2 files changed, 29 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 5bff45ed6c2..205b403c63e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Wed Apr 7 15:18:40 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * be/be_visitor_attribute/component_init.cpp:
+
+ Added check in generated code for the success of extraction
+ from Any. If extraction fails, we throw BAD_PARAM. I didn't
+ see any specific indications in the spec about what to
+ throw in this case.
+
Wed Apr 7 14:10:10 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_component/servant_svh.cpp:
diff --git a/TAO/TAO_IDL/be/be_visitor_attribute/component_init.cpp b/TAO/TAO_IDL/be/be_visitor_attribute/component_init.cpp
index 630702d8203..667b50ea77b 100644
--- a/TAO/TAO_IDL/be/be_visitor_attribute/component_init.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_attribute/component_init.cpp
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
be_visitor_attribute_component_init::be_visitor_attribute_component_init (
be_visitor_context *ctx)
: be_visitor_any_extracted_type_decl (ctx),
@@ -157,10 +156,22 @@ be_visitor_attribute_component_init::emit_init_block (void)
if (ft->accept (&decl_emitter) == -1)
{
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("be_visitor_attribute_component_init")
+ ACE_TEXT ("::emit_init_block - ")
+ ACE_TEXT ("Any extraction type visitor ")
+ ACE_TEXT ("failed\n")));
+
+ return;
}
os_ << be_nl
- << "descr_value >>= _extract_val;" << be_nl
+ << "::CORBA::Boolean good_extr = (descr_value >>= _extract_val);"
+ << be_nl << be_nl
+ << "if (!good_extr)" << be_idt_nl
+ << "{" << be_idt_nl
+ << "throw ::CORBA::BAD_PARAM ();" << be_uidt_nl
+ << "}" << be_uidt_nl << be_nl
<< "this->" << attr_->local_name ()->get_string ()
<< " (";
@@ -168,6 +179,13 @@ be_visitor_attribute_component_init::emit_init_block (void)
if (ft->accept (&arg_emitter) == -1)
{
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("be_visitor_attribute_component_init")
+ ACE_TEXT ("::emit_init_block - ")
+ ACE_TEXT ("Attribute set type visitor ")
+ ACE_TEXT ("failed\n")));
+
+ return;
}
os_ << ");";