summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/Makefile.am7
-rw-r--r--server/src/exception.cc6
2 files changed, 13 insertions, 0 deletions
diff --git a/server/src/Makefile.am b/server/src/Makefile.am
index 2276347..d797bc6 100644
--- a/server/src/Makefile.am
+++ b/server/src/Makefile.am
@@ -106,6 +106,7 @@ EXTRA_DIST = \
################
TESTFILES = \
+ test_exception \
test_templateheaderparser \
test_macroheaderparser \
test_templatelist \
@@ -141,6 +142,12 @@ test: $(TESTFILES)
test_clean:
rm -f $(TESTFILES) $(TESTLOGS)
+TEST_EXCEPTION_FILES = \
+ exception.cc \
+ log.cc
+test_exception: $(TEST_EXCEPTION_FILES)
+ @../../tools/test $(TEST_EXCEPTION_FILES)
+
TEST_TEMPLATEHEADERPARSER_FILES = \
templateheaderparser.cc \
$(PARSERFILES) \
diff --git a/server/src/exception.cc b/server/src/exception.cc
index 57bd6bf..09c6918 100644
--- a/server/src/exception.cc
+++ b/server/src/exception.cc
@@ -63,13 +63,19 @@ int main()
throw MyException();
} catch( MyException &e ) {
printf("%s\n", e.what());
+ goto on;
}
+ return 1;
+ on:
try {
throw MyExtException("Yeaaah!");
} catch( MyExtException &e ) {
printf("%s\n", e.what());
+ goto onandon;
}
+ return 1;
+ onandon:
return 0;
}