From ef3d967d8acab7d711c8e68229909e17fe19929e Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Sat, 3 Jan 2009 11:35:51 +0000 Subject: [PATCH] git-svn-id: https://projects.brucker.ch/su4sml/svn/su4sml/trunk@8369 3260e6d1-4efc-4170-b0a7-36055960796d --- su4sml/src/ocl_parser/type_checker.sml | 64 +++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/su4sml/src/ocl_parser/type_checker.sml b/su4sml/src/ocl_parser/type_checker.sml index e938cb8..8207c1d 100644 --- a/su4sml/src/ocl_parser/type_checker.sml +++ b/su4sml/src/ocl_parser/type_checker.sml @@ -826,41 +826,41 @@ fun check_context_list [] model = [] val s2 = ("Error Message: " ^ mes ^ "\n") val _ = trace exce (s1^s2) in - raise TC_OperationWithTypeError mes + raise TC_WrongContextChecked h + end + | TC_NoSuchAttributeError mes => + let + val s1 = ("TC_NoSuchAttributeError:\n") + val s2 = ("Error Message: " ^ mes ^ "\n") + val _ = trace exce (s1^s2) + in + raise TC_WrongContextChecked h + end + | GetClassifierError mes => + let + val s1 = ("GetClassifierError:\n") + val s2 = ("Error Message: " ^ mes ^ "\n") + val _ = trace exce (s1^s2) + in + raise TC_WrongContextChecked h + end + | TC_NoSuchOperationError mes => + let + val s1 = ("TC_NoSuchOperationError:\n") + val s2 = ("Error Message: " ^ mes ^ "\n") + val _ = trace exce (s1^s2) + in + raise TC_WrongContextChecked h end )::(check_context_list context_list_tail model)) - handle(* TC_WrongContextChecked h => *) -(* let *) -(* val s1 = ("\n\n#################################################\n") *) -(* val s2 = ("WrongContextChecked:\n") *) -(* val s3 = ("In Context: " ^ (cxt_list2string [h]) ^ "\n") *) -(* val _ = trace exce (s1^s2^s3) *) -(* in *) -(* raise TC_RootError ("Something went wrong!\n") *) -(* end *) -(* | *) TC_NoSuchAttributeError s => + handle TC_WrongContextChecked h => let - val s1 = ("\n\n#################################################\n") - val s2 = ("Attribute not found: "^s^ "\n") - val _ = print s2 - in (* ADB TODO *) - raise TC_RootError ("Something went wrong!\n") - end - | GetClassifierError s => - let - val s1 = ("\n\n#################################################\n") - val s2 = ("Classifier not found: "^s^ "\n") - val _ = print s2 - in (* ADB TODO *) - raise TC_RootError ("Something went wrong!\n") - end - | TC_NoSuchOperationError s => - let - val s1 = ("\n\n#################################################\n") - val s2 = ("Operation not found: "^s^ "\n") - val _ = print s2 - in (* ADB TODO *) - raise TC_RootError ("Something went wrong!\n") + val s1 = ("\n\n#################################################\n") + val s2 = ("WrongContextChecked:\n") + val s3 = ("In Context: " ^ (cxt_list2string [h]) ^ "\n") + val _ = trace exce (s1^s2^s3) + in + raise TC_RootError ("Something went wrong!\n") end end