summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Examples/python/exception/example.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Examples/python/exception/example.h b/Examples/python/exception/example.h
index 9f137b9a9..aff46568a 100644
--- a/Examples/python/exception/example.h
+++ b/Examples/python/exception/example.h
@@ -20,20 +20,25 @@ class Test {
public:
int simple() throw(int) {
throw(37);
+ return 1;
}
int message() throw(const char *) {
throw("I died.");
+ return 1;
}
int hosed() throw(Exc) {
- throw(Exc(42,"Hosed"));
+ throw(Exc(42,"Hosed"));
+ return 1;
}
int unknown() throw(A) {
- throw A();
+ throw A();
+ return 1;
}
int multi(int x) throw(int, const char *, Exc) {
if (x == 1) throw(37);
if (x == 2) throw("Bleah!");
if (x == 3) throw(Exc(42,"No-go-diggy-die"));
+ return 1;
}
};