Re: Raising Error Messages when setting an Attribute.
- From: Mark McLoughlin <mark skynet ie>
- To: Claude Beazley <cbeazley hgmp mrc ac uk>
- Cc: orbit-list gnome org
- Subject: Re: Raising Error Messages when setting an Attribute.
- Date: Mon, 22 Jul 2002 03:44:03 +0100 (IST)
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]