summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSon Ho2021-11-23 09:24:54 +0100
committerSon Ho2021-11-23 09:24:54 +0100
commit1a9c6c77cf9d4de6cd261125917eec2bd658d76c (patch)
tree77152a7a4c81b600b91f76bccc065b39e008ae25
parent1e8ebc7897422bab7efc639e26edbbcc9e5fff38 (diff)
Activate exception backtrace
Diffstat (limited to '')
-rw-r--r--src/dune16
-rw-r--r--src/main.ml5
2 files changed, 20 insertions, 1 deletions
diff --git a/src/dune b/src/dune
index f4f7152e..2d03b3f6 100644
--- a/src/dune
+++ b/src/dune
@@ -1,3 +1,17 @@
(executable
(name main)
- (libraries yojson zarith)) \ No newline at end of file
+ (libraries yojson zarith))
+
+(env
+ (dev (flags
+ :standard
+ -safe-string
+ -g
+ -w -8-9-11-33-20-21-26-27-39
+ ))
+ (release (flags
+ :standard
+ -safe-string
+ -g
+ -w -8-9-11-33-20-21-26-27-39
+ )))
diff --git a/src/main.ml b/src/main.ml
index a7388472..63bfd3a9 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -1,5 +1,10 @@
open CfimOfJson
open Interpreter
+open Errors
+
+(* This is necessary to have a backtrace when raising exceptions - for some
+ * reason, the -g option doesn't work *)
+let () = Printexc.record_backtrace true
let () =
let json = Yojson.Basic.from_file "../charon/charon/tests/test1.cfim" in