Skip to content

Commit

Permalink
Merge pull request #61 from GaloisInc/issue59
Browse files Browse the repository at this point in the history
Reimplement saw-core `error` with `userError` instead of `panic`.
  • Loading branch information
brianhuffman authored Jul 29, 2020
2 parents 6531359 + 7911931 commit 702dbfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions saw-core/src/Verifier/SAW/Simulator/Prims.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import Numeric.Natural (Natural)
import Verifier.SAW.Term.Functor (Ident, alistAllFields)
import Verifier.SAW.Simulator.Value
import Verifier.SAW.Prim
import qualified Verifier.SAW.Prim as Prim

import qualified Verifier.SAW.Utils as Panic (panic)

Expand Down Expand Up @@ -1191,8 +1192,8 @@ errorOp =
constFun $
strictFun $ \x ->
case x of
VString s -> panic s
_ -> panic "unknown error"
VString s -> Prim.userError s
_ -> Prim.userError "unknown error"

------------------------------------------------------------
-- Conditionals
Expand Down

0 comments on commit 702dbfc

Please sign in to comment.