[omniORB] type checking

Duncan Grisby duncan at grisby.org
Fri Jul 4 19:48:16 BST 2008


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 --



More information about the omniORB-list mailing list