From: "Steve" <nospam_steved94@comcast.net>
Subject: Re: OWN EXCEPTION NOT HANDLED
Date: Wed, 30 Nov 2005 18:34:23 -0800
Date: 2005-11-30T18:34:23-08:00 [thread overview]
Message-ID: <SsedncU4d8tH_RPenZ2dnUVZ_t2dnZ2d@comcast.com> (raw)
In-Reply-To: 1133351325.417716.228260@g43g2000cwa.googlegroups.com
"rashmi" <rashmi.thoras@gmail.com> wrote in message
news:1133351325.417716.228260@g43g2000cwa.googlegroups.com...
> Dear reader
>
> Inside a function I defined an exception of my own that is equivalent
> to an exception of constraint- error type. I have also created the
> associated exception handler as shown next:
> _________________
> :
> if RE_ScDSGA.IN_RanSeq < 0 then raise EX_RsqIvd; end if;
> if RE_ScDSGA.IN_RanSeq > 1 then raise EX_RsqIvd; end if;
> :
> :
> exception
> when EX_RsqIvd => put_line("EXCEPTION: Invalid key INPUT for random
> seq");
> return RE_ScDSGA;
> :
> ___________________
>
> There were no compiler errors or warnings. Now when a value of 2 was
> supplied for the field variable IN_RanSeq, a constraint error would be
> expected. But instead of handling this constraint error as I have
> defined above, Ada handled it on its own by raising Constraint_Error.
>
> My question is how do I get Ada to handle the constraint error from my
> own handler rather than from the handler of its own?
>
Try:
when Constraint_Error =>
Steve
(The Duck)
prev parent reply other threads:[~2005-12-01 2:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 11:48 OWN EXCEPTION NOT HANDLED rashmi
2005-11-30 12:45 ` Stephen Leake
2005-12-01 10:34 ` rashmi
2005-12-01 2:34 ` Steve [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox