diff -r 95d956108461 -r 460c24a6a6ba src/Tools/isac/Frontend/states.sml --- a/src/Tools/isac/Frontend/states.sml Tue Sep 28 08:58:06 2010 +0200 +++ b/src/Tools/isac/Frontend/states.sml Tue Sep 28 09:06:56 2010 +0200 @@ -183,7 +183,7 @@ (*///7.10.03/// add states to a users active states fun get_calcID (uI:iterID) (p:(iterID * (calcID * state) list) list) = case assoc (p, uI) of - NONE => raise error ("get_calcID: no iterID " ^ + NONE => error ("get_calcID: no iterID " ^ (string_of_int uI)) | SOME ps => (new_key ps 1):calcID; > get_calcID 1 (!states); @@ -193,7 +193,7 @@ fun get_iterID (cI:calcID) (p:(calcID * (calcstate * (iterID * pos') list)) list) = case assoc (p, cI) of - NONE => raise error ("get_iterID: no iterID " ^ (string_of_int cI)) + NONE => error ("get_iterID: no iterID " ^ (string_of_int cI)) | SOME (_, us) => (new_key us 1):iterID; (* get_iterID 3 (!states); val it = 2 : iterID*) @@ -204,7 +204,7 @@ (*//////7.10. fun get_cal (uI:iterID) (pI:calcID) (p:(iterID * (calcID * state) list) list) = (the (assoc2 (p,(uI, pI)))) - handle _ => raise error ("get_state " ^ (string_of_int uI) ^ + handle _ => error ("get_state " ^ (string_of_int uI) ^ " " ^ (string_of_int pI) ^ " not existent"); > get_cal 3 1 (!states); val it = (((EmptyPtree,(#,#)),[]),([],[])) : state @@ -216,15 +216,15 @@ *) fun get_calc (cI:calcID) = case assoc (!states, cI) of - NONE => raise error ("get_calc "^(string_of_int cI)^" not existent") + NONE => error ("get_calc "^(string_of_int cI)^" not existent") | SOME (c, _) => c; fun get_pos (cI:calcID) (uI:iterID) = case assoc (!states, cI) of - NONE => raise error ("get_pos: calc " ^ (string_of_int cI) + NONE => error ("get_pos: calc " ^ (string_of_int cI) ^ " not existent") | SOME (_, us) => (case assoc (us, uI) of - NONE => raise error ("get_pos: user " ^ (string_of_int uI) + NONE => error ("get_pos: user " ^ (string_of_int uI) ^ " not existent") | SOME p => p); @@ -271,27 +271,27 @@ fun overwrite2 (ps, (((uI:iterID), (pI:calcID)), p)) = let val new_ps = overwrite (the (assoc (ps, uI)), (pI, p)) in (overwrite (ps, (uI, new_ps))) - handle _ => raise error ("overwrite2 " ^ (string_of_int uI) ^ + handle _ => error ("overwrite2 " ^ (string_of_int uI) ^ " " ^ (string_of_int pI) ^ " not existent") end;*) fun overwrite2 (ps, (((cI:calcID), (uI:iterID)), p)) = case assoc (ps, cI) of NONE => - raise error ("overwrite2: calc " ^ (string_of_int uI) ^" not existent") + error ("overwrite2: calc " ^ (string_of_int uI) ^" not existent") | SOME (cs, us) => overwrite (ps, (cI ,(cs, overwrite (us, (uI, p))))); fun upd_calc (cI:calcID) cs = case assoc (!states, cI) of - NONE => raise error ("upd_calc "^(string_of_int cI)^" not existent") + NONE => error ("upd_calc "^(string_of_int cI)^" not existent") | SOME (_, us) => states:= overwrite (!states, (cI, (cs, us))); (*WN051210 testing before initac: only 1 taci in calcstate so far: fun upd_calc (cI:calcID) (cs as (_, tacis):calcstate) = (if length tacis > 1 - then raise error ("upd_calc, |tacis|>1: "^tacis2str tacis) + then error ("upd_calc, |tacis|>1: "^tacis2str tacis) else (); case assoc (!states, cI) of - NONE => raise error ("upd_calc "^(string_of_int cI)^" not existent") + NONE => error ("upd_calc "^(string_of_int cI)^" not existent") | SOME (_, us) => states:= overwrite (!states, (cI, (cs, us))) );*) @@ -304,7 +304,7 @@ fun upd_tacis (cI:calcID) tacis = case assoc (!states, cI) of NONE => - raise error ("upd_tacis: calctree "^(string_of_int cI)^" not existent") + error ("upd_tacis: calctree "^(string_of_int cI)^" not existent") | SOME ((ptp,_), us) => states:= overwrite (!states, (cI, ((ptp, tacis), us))); (*///7.10. @@ -314,7 +314,7 @@ fun upd_ipos (cI:calcID) (uI:iterID) (ip:pos') = case assoc (!states, cI) of NONE => - raise error ("upd_ipos: calctree "^(string_of_int cI)^" not existent") + error ("upd_ipos: calctree "^(string_of_int cI)^" not existent") | SOME (cs, us) => states:= overwrite2 (!states, ((cI, uI), ip)); @@ -348,7 +348,7 @@ fun add_user (cI:calcID) = case assoc (!states, cI) of NONE => - raise error ("add_user: calctree "^(string_of_int cI)^" not existent") + error ("add_user: calctree "^(string_of_int cI)^" not existent") | SOME (cs, us) => let val new_uI = new_key us 1 in states:= overwrite2 (!states, ((cI, new_uI), e_pos'));