From c29fdac7ced776fcd33956b9fd96c95e5af3023e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 6 Feb 2008 18:24:17 +0000 Subject: 2008-02-06 Joel Sherrill * ChangeLog, Makefile, exception_test.adb: New files. --- exception_test/ChangeLog | 4 ++++ exception_test/Makefile | 25 +++++++++++++++++++++++++ exception_test/exception_test.adb | 20 ++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 exception_test/ChangeLog create mode 100644 exception_test/Makefile create mode 100644 exception_test/exception_test.adb diff --git a/exception_test/ChangeLog b/exception_test/ChangeLog new file mode 100644 index 0000000..bf98b82 --- /dev/null +++ b/exception_test/ChangeLog @@ -0,0 +1,4 @@ +2008-02-06 Joel Sherrill + + * ChangeLog, Makefile, exception_test.adb: New files. + diff --git a/exception_test/Makefile b/exception_test/Makefile new file mode 100644 index 0000000..9f5d6a5 --- /dev/null +++ b/exception_test/Makefile @@ -0,0 +1,25 @@ +# +# Makefile for Ada Dump URL example +# +# See README.Makefiles in the main ada-examples directory. +# + +PROGRAM=exception_test + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc +include $(RTEMS_CUSTOM) +include $(PROJECT_ROOT)/make/leaf.cfg + +# stack size for the first Ada thread +CFLAGS +=-DGNAT_MAIN_STACKSPACE=100 + +# initialize the network stack -- assumes existence of networkconfig.h +# CFLAGS +=-DMAIN_USE_NETWORKING=1 + +# Should we prompt for command line arguments? +# DEFINES +=-DMAIN_USE_REQUIRES_COMMAND_LINE + +# If you want to hard-code the command line, define this to a string +# DEFINES += -DMAIN_COMMAND_LINE="ARGS" + +include ../Makefile.shared diff --git a/exception_test/exception_test.adb b/exception_test/exception_test.adb new file mode 100644 index 0000000..47fe592 --- /dev/null +++ b/exception_test/exception_test.adb @@ -0,0 +1,20 @@ +-- +-- $Id$ +-- + +with Ada.Text_IO; use Ada.Text_IO; + +procedure ExceptionTest is +begin + begin + Put_Line ("Raising Constraint_Error"); + raise Constraint_Error; + exception + when others => + Put_Line ("Caught Constraint_Error -- inner"); + end; +exception + when others => + Put_Line ("Caught Constraint_Error -- outer -- not OK"); +end ExceptionTest; + -- cgit v1.2.3