Lines Matching refs:Error
21 exception Error of string;
25 fun Error_to_string (Error message) = "\nError: " ^ message ^ "\n"
26 | Error_to_string _ = raise Bug "Error_to_string: not an Error exception";
31 fun report (e as Error _) = Error_to_string e
33 | report _ = raise Bug "report: not an Error or Bug exception";
38 handle h as Error _ => (print (Error_to_string h); raise h)
42 fun total f x = SOME (f x) handle Error _ => NONE;
46 fun partial (e as Error _) f x = (case f x of SOME y => y | NONE => raise e)
47 | partial _ _ _ = raise Bug "partial: must take an Error exception";
241 | z _ _ _ = raise Error "zipwith: lists different lengths";
356 fn [] => raise Error "minimum: empty list"
420 if Binaryset.member (stack,x) then raise Error "top_sort: cycle"
442 case Int.fromString s of SOME n => n | NONE => raise Error "string_to_int";
460 else raise Error "int_to_base64: out of range";
465 | NONE => raise Error "base64_to_int: out of range";
609 fun check s = assert (String.isPrefix p s) (Error "dest_prefix")