From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_05,FORGED_GMAIL_RCVD, FREEMAIL_FROM,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,94868228472d8299,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail From: "rashmi" Newsgroups: comp.lang.ada Subject: OWN EXCEPTION NOT HANDLED Date: 30 Nov 2005 03:48:45 -0800 Organization: http://groups.google.com Message-ID: <1133351325.417716.228260@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: 61.11.60.236 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1133351330 28695 127.0.0.1 (30 Nov 2005 11:48:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 30 Nov 2005 11:48:50 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=61.11.60.236; posting-account=3DKkFw0AAACqdEmipLjcQnXXVUyr7_Eb Xref: g2news1.google.com comp.lang.ada:6676 Date: 2005-11-30T03:48:45-08:00 List-Id: 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?