[omniORB] type checking
Ridgway, Richard (London)
Richard_Ridgway at ml.com
Fri Jul 4 21:23:10 BST 2008
In a function on the server this tells you the desired return
parameters: self._omni_op_d[sys._getframe().f_code.co_name][1]
I can't quite put it all together with the decorator as I don't
understand how the omniorbpy typecodes work. A string return is fine for
idl sequence<octet> - but how do I know that?. I can get the typecode of
my returning value, just don't know how to test for equivalence. There's
probably a call hidden away in omniorb, I just can't see it. Duncan?
Richard
-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org]
Sent: 04 July 2008 18:48
To: Michael Brenner
Cc: Ridgway, Richard (London); omniorb-list at omniorb-support.com
Subject: Re: [omniORB] type checking
On Friday 4 July, Michael Brenner wrote:
> Thanks, Richard. But, you specify the return types by hand, right?
> Given that they are already defined in the IDL I had thought there was
> a way to access them directly somehow. However, the only thing I have
> is pthe ython stubs generated by omniIDL -bpython. And those are very
> underspecified, so can't really be used for type checking (I think,
> but hope to be proven wrong).
All the information about the expected types is in the generated code.
That's how omniORB can send the BAD_PARAM exceptions you're seeing. You
can get some clue about what was expected by running with
-ORBtraceExceptions 1, which will tell you where in the C++ code of
omniORBpy the exception was thrown, which will allow you to work out
what type it was looking for.
A Python-level decorator that optionally checked things first would be
great, since it would be able to report much clearer errors. Any
volunteers?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
--------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------
More information about the omniORB-list
mailing list