diff --git a/impls/sml/step9_try.sml b/impls/sml/step9_try.sml index ee3a8783..afbe45ee 100644 --- a/impls/sml/step9_try.sml +++ b/impls/sml/step9_try.sml @@ -71,6 +71,7 @@ and evalTry e [a, LIST ([SYMBOL "catch*", b, c],_)] = (eval e a handle ex => eva and evalCatch e b ex body = eval (bind [b, exnVal ex] e) body and exnVal (MalException x) = x + | exnVal (SyntaxError msg) = STRING msg | exnVal (NotDefined msg) = STRING msg | exnVal (NotApplicable msg) = STRING msg | exnVal (OutOfBounds msg) = STRING msg diff --git a/impls/sml/stepA_mal.sml b/impls/sml/stepA_mal.sml index 4c1119dd..497e7714 100644 --- a/impls/sml/stepA_mal.sml +++ b/impls/sml/stepA_mal.sml @@ -71,6 +71,7 @@ and evalTry e [a, LIST ([SYMBOL "catch*", b, c],_)] = (eval e a handle ex => eva and evalCatch e b ex body = eval (bind [b, exnVal ex] e) body and exnVal (MalException x) = x + | exnVal (SyntaxError msg) = STRING msg | exnVal (NotDefined msg) = STRING msg | exnVal (NotApplicable msg) = STRING msg | exnVal (OutOfBounds msg) = STRING msg diff --git a/impls/tests/step9_try.mal b/impls/tests/step9_try.mal index 975cb541..b3a5b1ed 100644 --- a/impls/tests/step9_try.mal +++ b/impls/tests/step9_try.mal @@ -41,6 +41,7 @@ (try* (map throw (list "my err")) (catch* exc exc)) ;=>"my err" + ;; ;; Testing builtin functions