From 2c553f5537e9bbcceaf488ad164d6178476fb017 Mon Sep 17 00:00:00 2001 From: Chantal Keller Date: Fri, 15 May 2020 17:34:38 +0200 Subject: Failure instead of exception when atom is not well-typed --- src/trace/smtAtom.ml | 4 +--- src/trace/smtAtom.mli | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/trace/smtAtom.ml b/src/trace/smtAtom.ml index b1762dc..c20a75d 100644 --- a/src/trace/smtAtom.ml +++ b/src/trace/smtAtom.ml @@ -761,8 +761,6 @@ module Atom = HashAtom.clear reify.tbl - exception NotWellTyped of atom - let declare reify a = let res = {index = reify.count; hval = a} in HashAtom.add reify.tbl a res; @@ -793,7 +791,7 @@ module Atom = else ( Format.eprintf "Incorrect type: wanted %a, got %a@." SmtBtype.to_smt t SmtBtype.to_smt th; - raise (NotWellTyped a) + failwith (Format.asprintf "Atom %a is not of the expected type" to_smt h) ) in diff --git a/src/trace/smtAtom.mli b/src/trace/smtAtom.mli index a6a1761..f076cb8 100644 --- a/src/trace/smtAtom.mli +++ b/src/trace/smtAtom.mli @@ -121,8 +121,6 @@ module Atom : val to_smt : Format.formatter -> t -> unit - exception NotWellTyped of atom - type reify_tbl val create : unit -> reify_tbl -- cgit