summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-06 18:24:17 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-06 18:24:17 +0000
commitc29fdac7ced776fcd33956b9fd96c95e5af3023e (patch)
tree4612b75ca5c208d59f7216f9f6ded36cbac1565a
parent84c019f33ef0b3cfb1fda7c50e459d933f3039fe (diff)
2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* ChangeLog, Makefile, exception_test.adb: New files.
-rw-r--r--exception_test/ChangeLog4
-rw-r--r--exception_test/Makefile25
-rw-r--r--exception_test/exception_test.adb20
3 files changed, 49 insertions, 0 deletions
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 <joel.sherrill@oarcorp.com>
+
+ * 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;
+