Common exception handling



I'm wondering if there is a clean way to do something common for all
throw exceptions and then handle each exception. For exception...

procedure Test (Rec : Record) is
begin

... throw 3 possible exceptions...


exception
when A =>
Print_Test (Rec);
...
when B =>
Print_Test (Rec);
...
when C =>
Print_Test (Rec);
...
when others =>
Print_Test (Rec);
end Test;

I'd like to not duplicate the Print_Test in each situation. Is there
an easy way

Thanks,

Shaun
.



Relevant Pages

  • Re: Allocators and exceptions => Read Me First
    ... immediate during a raised exception. ... pragma Restrictions; ... -- The point Value is still points to a valid location ...
    (comp.lang.ada)
  • Re: Character advancement in games (was Re: Alien RPG cancelled, Obsidian in trouble)
    ... exception of Briarroot, whose smug selfcentredness makes me want to kill him, ... might be able to, if we're not too busy handing billions to GM or some other corporate fuckwits who have paid themselves huge bonuses while screwing their employees, customers and creditors ... ... or you don't, and you think that there is such a thing as the common good, and that it's worth pursuing per se, and not just as a by-product of self-interest. ... Briarroot does. ...
    (comp.sys.ibm.pc.games.rpg)
  • Re: Wow! Its a Yogh!
    ... "swamp" would then be an exception. ... I have never encountered before now any such claim like this about the sound "blocking" the sound change of a short-o that is common in "wa-" words. ...
    (sci.lang)
  • Re: Find rare bugs - SEH and c++ exception handling
    ... Such pain is more common than any of us would like to admit. ... cause is often a bad pointer or code that cleans up an array ... When the kernel detects an application exception, ... The bug is not reproducible and occours without user interaction (there ...
    (microsoft.public.pocketpc.developer)
  • Re: type inference problem in my ocaml program (program is very short)
    ... return its body if no exception is encountered, ... let rec read_until_eof handle = ... even with strict evaluation :-) ... Uebrigens gibt es auch die deutschsprachige Gruppe de.comp.lang.funktional, ...
    (comp.lang.functional)