Commit 690d700
committed
ConsistencyError: swap params to match the error message
This will make the correspondence between the line of code where the
exception is thrown and the error message less confusing. Currently, the
stack trace looks like this:
```
Traceback (most recent call last):
(...)
File "(...)\vlq_base128_le.py", line 85, in _check
raise kaitaistruct.ConsistencyError(u"groups", self.groups[i]._root, self._root)
kaitaistruct.ConsistencyError: Check failed: groups, expected: <vlq_base128_le.VlqBase128Le object at 0x0000025E86955CA0>, actual: None
```
At first glance, it might seem that `self.groups[i]._root` was the
"expected" value and `self._root` was the "actual" value, but it's
actually the other way around. This doesn't seem very intuitive.
In addition, the new order `expected, actual` is already used in
ValidationNotEqualError, so using the opposite order here seems
inconsistent.1 parent fa6fbd5 commit 690d700
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | | - | |
| 1011 | + | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
1015 | 1014 | | |
| 1015 | + | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
| |||
0 commit comments