Commit e0e4fcb
committed
Make InvalidIdentifier exception subclass of ExpressionError
Fixes test which instead of reporting error shows this exception:
[info] - expr_bad_id_inst_value *** FAILED ***
[info] io.kaitai.struct.format.InvalidIdentifier: invalid ID: 'BAD', expected /^[a-z][a-z0-9_]*$/
[info] at io.kaitai.struct.format.Identifier$.checkIdentifier(Identifier.scala:52)
[info] at io.kaitai.struct.format.InstanceIdentifier.<init>(Identifier.scala:113)
[info] at io.kaitai.struct.ClassTypeProvider.resolveMember(ClassTypeProvider.scala:83)
[info] at io.kaitai.struct.ClassTypeProvider.determineType(ClassTypeProvider.scala:46)
[info] at io.kaitai.struct.ClassTypeProvider.determineType(ClassTypeProvider.scala:20)
[info] at io.kaitai.struct.translators.TypeDetector.detectTypeRaw(TypeDetector.scala:61)
[info] at io.kaitai.struct.translators.TypeDetector.detectType(TypeDetector.scala:25)
[info] at io.kaitai.struct.precompile.ValueTypesDeriver.$anonfun$deriveValueType$2(ValueTypesDeriver.scala:28)
[info] at io.kaitai.struct.precompile.ValueTypesDeriver.$anonfun$deriveValueType$2$adapted(ValueTypesDeriver.scala:21)
[info] at scala.collection.immutable.RedBlackTree$.foreach(RedBlackTree.scala:291)
[info] ...1 parent 83dde4b commit e0e4fcb
6 files changed
Lines changed: 9 additions & 10 deletions
File tree
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | 236 | | |
239 | 237 | | |
240 | 238 | | |
| |||
269 | 267 | | |
270 | 268 | | |
271 | 269 | | |
272 | | - | |
273 | | - | |
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
| |||
0 commit comments