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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,33dd986048344726 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-02 06:17:04 PST From: Lars Troppen Newsgroups: comp.lang.ada Subject: Re: What happens to Ada exceptions if c calls ada Date: 02 Jul 2001 13:32:14 +0200 Organization: Kongsberg Gruppen ASA Message-ID: References: <2d87db3f.0107020033.5f0d19d0@posting.google.com> NNTP-Posting-Host: 150.1.70.29 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Cuyahoga Valley) Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!Norway.EU.net!193.71.169.73!spiten.kongsberg.com!kongsberg!not-for-mail Xref: archiver1.google.com comp.lang.ada:9325 Date: 2001-07-02T13:32:14+02:00 List-Id: Mark.Doherty@uk.thalesgroup.com (Mark Doherty) writes: > I am writing a mixed language application (not by choice). > > I have an Ada main program calling c routines that in turn calling an > Ada device driver. > > What happens if the device driver raises an exception? >From my experience the exception will be propagated up to the first block that contains an exception handler. So your C code will never see the exceptions (natually). If your c code has problems with this you have to make sure that all exceptions are trapped in the device driver and converted to return codes that C will understand. Lars Troppen, Dept DC4S, Kongsberg Defence & Aerospace PO 1003, N3601 Kongsberg, Norway Tel: (+47) 32288722 Mail: lars.g.troppen@kongsberg.com