Lines Matching refs:Error
13 exception Error of string;
16 fun Error_to_string (Error message) =
18 | Error_to_string _ = raise Bug "Error_to_string: not an Error exception";
24 fun report (e as Error _) = Error_to_string e
26 | report _ = raise Bug "report: not an Error or Bug exception";
31 handle h as Error _ => (print (Error_to_string h); raise h)
35 fun total f x = SOME (f x) handle Error _ => NONE;
39 fun partial (e as Error _) f x = (case f x of SOME y => y | NONE => raise e)
40 | partial _ _ _ = raise Bug "partial: must take an Error exception";
194 | z _ _ _ = raise Error "zipwith: lists different lengths";
312 fn [] => raise Error "min: empty list"
365 if Binaryset.member (stack,x) then raise Error "top_sort: cycle"
386 case Int.fromString s of SOME n => n | NONE => raise Error "string_to_int";
403 else raise Error "int_to_base64: out of range";
407 | NONE => raise Error "base64_to_int: out of range";
518 fun check s = assert (String.isPrefix p s) (Error "dest_prefix")