# HG changeset patch # User wneuper # Date 1659692290 -7200 # Node ID e1ca211459d18813704c6a1d83924c764ac5404a # Parent 795d1352493a8d43894a4b06b7409fd0da364ef2 improve error-msg of Problem.from_store, MethodC.from_store diff -r 795d1352493a -r e1ca211459d1 TODO.md --- a/TODO.md Fri Aug 05 08:45:37 2022 +0200 +++ b/TODO.md Fri Aug 05 11:38:10 2022 +0200 @@ -67,8 +67,6 @@ ***** priority of WN items is top down, most urgent/simple on top -* WN: MethodC.from_store throws exn 'get_pbt not found: ' ... confusing !! take 'ketype' as an argument - * WN: rewriting with ctxt not complete (cause errors hard to indentify later) - Prconditions.eval - Solve_Step.check ..Rewrite_Inst, Substitute, .. diff -r 795d1352493a -r e1ca211459d1 src/Tools/isac/MathEngBasic/MathEngBasic.thy --- a/src/Tools/isac/MathEngBasic/MathEngBasic.thy Fri Aug 05 08:45:37 2022 +0200 +++ b/src/Tools/isac/MathEngBasic/MathEngBasic.thy Fri Aug 05 11:38:10 2022 +0200 @@ -48,5 +48,18 @@ ML \ \ ML \ \ ML \ +fun from_store id = Store.get (get_pbls ()) id (rev id); +\ ML \ +from_store: Store.key -> Probl_Def.T +\ ML \ +fun from_store id = + (Store.get (get_pbls ()) id (rev id)) + handle ERROR _ => + raise error ("*** ERROR Problem.from_store " ^ strs2str id ^ " not found"); +\ ML \ +\ ML \ +\ ML \ +\ ML \ +\ ML \ \ end diff -r 795d1352493a -r e1ca211459d1 src/Tools/isac/MathEngBasic/method.sml --- a/src/Tools/isac/MathEngBasic/method.sml Fri Aug 05 08:45:37 2022 +0200 +++ b/src/Tools/isac/MathEngBasic/method.sml Fri Aug 05 11:38:10 2022 +0200 @@ -143,7 +143,14 @@ (** get MethodC from Store **) (* TODO: throws exn 'get_pbt not found: ' ... confusing !! take 'ketype' as an argument *) -fun from_store metID = Store.get (get_mets ()) metID metID; -fun from_store' thy metID = Store.get (KEStore_Elems.get_mets thy) metID metID; +fun from_store id = + (Store.get (get_mets ()) id id) + handle ERROR _ => + raise error ("*** ERROR MethodC.from_store " ^ strs2str id ^ " not found"); + +fun from_store' thy id = + (Store.get (KEStore_Elems.get_mets thy) id id) + handle ERROR _ => + raise error ("*** ERROR MethodC.from_store thy " ^ strs2str id ^ " not found"); (**)end(**) diff -r 795d1352493a -r e1ca211459d1 src/Tools/isac/MathEngBasic/problem.sml --- a/src/Tools/isac/MathEngBasic/problem.sml Fri Aug 05 08:45:37 2022 +0200 +++ b/src/Tools/isac/MathEngBasic/problem.sml Fri Aug 05 11:38:10 2022 +0200 @@ -278,6 +278,9 @@ (** get Problem from Store **) -fun from_store id = Store.get (get_pbls ()) id (rev id); +fun from_store id = + (Store.get (get_pbls ()) id (rev id)) + handle ERROR _ => + raise error ("*** ERROR Problem.from_store " ^ strs2str id ^ " not found"); (**)end(**)