3 * Check handling of exceptions
5 * (c) 2023 Straylight/Edgeware
8 /*----- Licensing notice --------------------------------------------------*
10 * This file is part of the `Finally' package.
12 * Finally is free software: you can redistribute it and/or modify it
13 * under the terms of the GNU Library General Public License as published
14 * by the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * Finally is distributed in the hope that it will be useful, but WITHOUT
18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
20 * License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with Finally. If not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
28 /*----- Header files ------------------------------------------------------*/
30 #include "finally-test.h"
32 /*----- Main code ---------------------------------------------------------*/
36 void try_catch_inner(unsigned f
)
38 if (f
&TCF_THROW
) STEP(11);
40 if (f
&TCF_THROW
) throw ball();
43 void try_catch_outer(unsigned f
)
45 if (f
&TCF_THROW
) STEP(9);
47 try { try_catch_filling(f
); STEP(6); }
48 catch (ball
) { STEP(13); }
49 if (f
&TCF_THROW
) STEP(14);
53 /*----- That's all, folks -------------------------------------------------*/