Re: Raising Error Messages when setting an Attribute.



Hey,

On Sat, 20 Jul 2002, Claude Beazley wrote:

>
> I have an attribute, "Foo"  in my IDL which the client can set. However I
> want it to raise an error, if the client tries to set the attribute wrongly.
> How do I write the IDL file to raise an error on an attribute when the client
> calls the __set_Foo method?

	You can't throw exceptions from attribute accessors. Just use
::set_foo() and ::get_fo() methods instead of attributes and you can
use exceptions with them.

Good Luck,
Mark.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]