comp.lang.ada
 help / color / mirror / Atom feed
* OWN EXCEPTION NOT HANDLED
@ 2005-11-30 11:48 rashmi
  2005-11-30 12:45 ` Stephen Leake
  2005-12-01  2:34 ` Steve
  0 siblings, 2 replies; 4+ messages in thread
From: rashmi @ 2005-11-30 11:48 UTC (permalink / 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?




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-12-01 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox