Commit 0578342e authored by Louis Beauloye's avatar Louis Beauloye
Browse files

error message in data

parent 00ab868f
......@@ -601,7 +601,7 @@ class MbsData(object):
else:
mbs_msg(fun + " is not an existing user function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
def __assign_symb_fct_to_none__(self, functions):
"""Create fields for symbolic functions fields and set them to None.
......@@ -642,7 +642,7 @@ class MbsData(object):
else:
mbs_msg(fun + " is not an existing symbolic function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
def __load_user_fct__(self, module_dir, functions, user_path):
"""
......@@ -879,7 +879,7 @@ class MbsData(object):
else:
mbs_msg(fun + " is not an existing user function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
def __load_symbolic_fct__(self, module_dir, functions, symbolic_path):
"""
......@@ -1018,7 +1018,7 @@ class MbsData(object):
mbs_msg(fun + " is not an existing symbolic function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
def __assign_user_fct__(self, functions, mbs_module=None):
"""
......@@ -1160,7 +1160,7 @@ class MbsData(object):
else:
mbs_msg(fun + " is not an existing user function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
return
......@@ -1254,7 +1254,7 @@ class MbsData(object):
mbs_msg(fun + " is not an existing symbolic function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
def __callback_user_equil_fxe(self, mbs_module, fun, f):
if not isinstance(mbs_module, MbsEquil):
......@@ -1438,7 +1438,7 @@ class MbsData(object):
else:
mbs_msg(fun + " is not an existing symbolic function")
else:
mbs_msg('The "functions" parameter must be a list and not a ' + str(type(functions)))
raise TypeError('The "functions" parameter must be a list, got a {:}.'.format(type(functions)))
def __set_user_fct_from_file__(self, function_name, user_path, user_file):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment