Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Improved error message (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianAlgehed authored Mar 3, 2022
1 parent 9b5aeea commit c9c1e91
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,9 @@ checkBalances s envOuter = Map.foldrWithKey (\ w sval p -> walletFundsChange w s
dist <- Freer.ask @InitialDistribution
case outcome of
Done envInner -> do
let lookup (SymToken outerVar idx) = fromJust . Map.lookup idx $ fold (Map.lookup (lookUpVar envOuter outerVar) envInner)
let lookup st@(SymToken outerVar idx) = case Map.lookup idx $ fold (Map.lookup (lookUpVar envOuter outerVar) envInner) of
Nothing -> error ("Trying to look up unknown symbolic token: " ++ show st)
Just tok -> tok
dlt = toValue lookup sval
initialValue = fold (dist ^. at w)
finalValue = finalValue' P.+ fees
Expand Down

0 comments on commit c9c1e91

Please sign in to comment.