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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:aed:376a:: with SMTP id i97mr3769233qtb.44.1580375836517; Thu, 30 Jan 2020 01:17:16 -0800 (PST) X-Received: by 2002:a05:6808:b1c:: with SMTP id s28mr2275102oij.2.1580375836206; Thu, 30 Jan 2020 01:17:16 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no2329018qtd.0!news-out.google.com!w29ni1091qtc.0!nntp.google.com!g89no2329012qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 30 Jan 2020 01:17:15 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=176.11.81.12; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 176.11.81.12 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Last chance handler on a PC From: Egil H H Injection-Date: Thu, 30 Jan 2020 09:17:16 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57986 Date: 2020-01-30T01:17:15-08:00 List-Id: On Thursday, January 30, 2020 at 9:55:42 AM UTC+1, ah...@marriott.org wrote: > Hi, > > Does anyone know if it is possible to install a last chance handler for a PC program. > Ie Write a procedure that gets called when a program issues an unhandled exception > If it is possible how do you do it? You can use the Termination_Handler in Annex C.7.3 (Added in Ada 2005), provided your compiler/runtime supports it. http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-C-7-3.html Example usage is discussed in the Ada 2005 Rationale: https://www.adaic.org/resources/add_content/standards/05rat/html/Rat-5-2.html#I1150 -- ~egilhh