- dim = str(err.algoDim)
- if err.name == MISSING_ALGO:
- reason = glob + dim + "D algorithm is missing"
- elif err.name == MISSING_HYPO:
- name = '"' + err.algoName + '"'
- reason = glob + dim + "D algorithm " + name + " misses " + dim + "D hypothesis"
- elif err.name == NOT_CONFORM_MESH:
- reason = "Global \"Not Conform mesh allowed\" hypothesis is missing"
- elif err.name == BAD_PARAM_VALUE:
- name = '"' + err.algoName + '"'
- reason = "Hypothesis of" + glob + dim + "D algorithm " + name +\
- " has a bad parameter value"
+ dim = err.algoDim
+ name = err.algoName
+ if len(name) == 0:
+ reason = '%s %sD algorithm is missing' % (glob, dim)
+ elif err.state == HYP_MISSING:
+ reason = ('%s %sD algorithm "%s" misses %sD hypothesis'
+ % (glob, dim, name, dim))
+ elif err.state == HYP_NOTCONFORM:
+ reason = 'Global "Not Conform mesh allowed" hypothesis is missing'
+ elif err.state == HYP_BAD_PARAMETER:
+ reason = ('Hypothesis of %s %sD algorithm "%s" has a bad parameter value'
+ % ( glob, dim, name ))
+ elif err.state == HYP_BAD_GEOMETRY:
+ reason = ('%s %sD algorithm "%s" is assigned to geometry mismatching'
+ 'its expectation' % ( glob, dim, name ))