Require Pythonic error message for wrong data type
- Dominant language
- Python
- Stars
- 497
- Forks
- 77
- Avg merge
- 22h 37m
- Merged PRs (30d)
- 45
Description
E.g.,
```
>>> s.solution.report_definitions.surface["r1"](report_type="surface-areaavg",field="pressure",average_over=1, per_surface=False,surface_names="wall")
Error: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: "wall"
```
Requires e.g., a `TypeError` such as
```
TypeError: surface_names must be a str list, not a str
```
Next I change the value of the bool per_surface to an integer, and this is accepted and reflected in the new state:
```
>>> s.solution.report_definitions.surface["r1"](report_type="surface-areaavg",field="pressure",average_over=1, per_surface=1,surface_names=["wall"])
>>> s.solution.report_definitions.surface["r1"]()
{'report_type': 'surface-areaavg', 'field': 'pressure', 'average_over': 1, 'per_surface': 1, 'surface_names': ['wall']}
```
I change the integer, average_over, to a boolean and this causes another low-level error:
```
>>> s.solution.report_definitions.surface["r1"](report_type="surface-areaavg",field="pressure",average_over=True, per_surface=False,surface_names=["wall"])
Error: < (less-than): invalid argument [2]: wrong type [not a number]
Error Object: #t
```
Contributor guide
Assessment
This issue has not been assessed yet.