comp.lang.ada
 help / color / mirror / Atom feed
From: "rashmi" <rashmi.thoras@gmail.com>
Subject: OWN EXCEPTION NOT HANDLED
Date: 30 Nov 2005 03:48:45 -0800
Date: 2005-11-30T03:48:45-08:00	[thread overview]
Message-ID: <1133351325.417716.228260@g43g2000cwa.googlegroups.com> (raw)

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?




             reply	other threads:[~2005-11-30 11:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30 11:48 rashmi [this message]
2005-11-30 12:45 ` OWN EXCEPTION NOT HANDLED Stephen Leake
2005-12-01 10:34   ` rashmi
2005-12-01  2:34 ` Steve
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox