Raise exception while nested calling of ms_function
This commit is contained in:
parent
36be3f9c4f
commit
477bf20fa6
|
@ -549,6 +549,12 @@ class Parser:
|
|||
error_info = f"The builtin function '{var}' is not supported in graph mode."
|
||||
return None, var, error_info
|
||||
return self.global_namespace, var
|
||||
|
||||
# For ms_function the function_name not equals to __code__.co_name
|
||||
if self.function_name != self.fn.__code__.co_name:
|
||||
raise TypeError(f"Not support nested calling of local ms_function, "
|
||||
f"please delete decorator of '{self.function_name}'.")
|
||||
|
||||
error_info = f"The name '{var}' is not defined."
|
||||
return None, var, error_info
|
||||
|
||||
|
|
Loading…
Reference in New Issue