[project @ 1999-03-26 19:45:51 by sof]
authorsof <unknown>
Fri, 26 Mar 1999 19:45:51 +0000 (19:45 +0000)
committersof <unknown>
Fri, 26 Mar 1999 19:45:51 +0000 (19:45 +0000)
assertError: raise an AssertionFailed exception

ghc/lib/std/PrelErr.lhs

index ee22bda..9415258 100644 (file)
@@ -163,7 +163,7 @@ recUpdError                  s = throw (RecUpdError (untangle s "Record doesn't contain field(
 assertError :: String -> Bool -> a -> a
 assertError str pred v 
   | pred      = v
-  | otherwise = error (untangle str "Assertion failed")
+  | otherwise = throw (AssertionFailed (untangle str "Assertion failed"))
 
 \end{code}