aboutsummaryrefslogtreecommitdiff
path: root/vquad/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'vquad/__main__.py')
-rw-r--r--vquad/__main__.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/vquad/__main__.py b/vquad/__main__.py
new file mode 100644
index 0000000..280de87
--- /dev/null
+++ b/vquad/__main__.py
@@ -0,0 +1,19 @@
+# Copyright 2018 Christoph Groth (CEA).
+#
+# This file is part of Vquad. It is subject to the license terms in the file
+# LICENSE.rst found in the top-level directory of this distribution.
+
+import sys
+import traceback
+from . import benchmark
+
+# Make sure that whenever there is an exception it is printed and an
+# appropriate exit code is set.
+rc = 1
+try:
+ benchmark.main()
+ rc = 0
+except (Exception, KeyboardInterrupt):
+ traceback.print_exc()
+finally:
+ sys.exit(rc)