IDL operations can raise exceptions to indicate the occurrence of an error.
raises
clause to the operation definition.
For example, the operation makeWithdrawal
in interface Account
could raise an exception to indicate that the withdrawal has failed, as follows:
module Finance { interface Account { exception WithdrawalFailure { string reason; }; void makeWithdrawal(in float amount, out float newBalance) raises(WithdrawalFailure); ... }; };
In the above example, the exception WithdrawalFailure
includes
a single member of type string
.
raises
clause follows the definition of operation
makeWithdrawal
to indicate that this operation can raise
exception WithdrawalFailure
.
raises
clause and separate the identifiers using commas.