Repository navigation
Commit 58a9cd5
Require a kind on every vortex_err!, vortex_ensure! and vortex_panic!
A message with no leading `Kind:` still compiled and quietly became Other.
The previous commits tagged every vortex_err!/vortex_bail! site, but the
untagged form survived in 1133 other places: vortex_ensure! and
vortex_ensure_eq! pass their message straight to an untagged vortex_bail!, so
748 checks returned Other errors callers could see; 350 vortex_panic! calls
printed "Other error:"; and wrapper macros in vortex-jni and vortex-duckdb
forwarded bare messages the same way.
Every one now names its kind, chosen by reading the site:
InvalidArgument 449 ValueError
MismatchedTypes 272 TypeError
AssertionFailed 182 AssertionError
OutOfBounds 99 IndexError
Serde 54 ValueError, as json.JSONDecodeError
Overflow 32 OverflowError
NotImplemented 31 NotImplementedError
Io 7 OSError
Other 5 RuntimeError
NotFound 2 KeyError
The split that mattered most for vortex_ensure!: a check on what the caller
passed in (a constructor's lengths, a builder's dtype) is InvalidArgument or
MismatchedTypes, a length mismatch is never a type error, and a check that a
kernel, rewrite or executor kept its own contract (a reduced array changing
dtype, a take producing the wrong length) is AssertionFailed. Checks made
while decoding metadata or a wire format are Serde.
The untagged arms are gone from vortex_err! and vortex_panic!. In their place
an arm raises a compile error naming the fix, e.g.
vortex_err! needs a kind before its message, e.g.
`vortex_err!(InvalidArgument: "negative length {}")`
vortex_ensure! reaches the same error through vortex_bail!. In vortex_panic!
the arm sits before the `$err:expr` arms, which a bare message would
otherwise match. The now-unused panic_fmt helper is removed. compile_fail
doctests on the three macros keep the untagged form from coming back.
vortex_ensure! without a message still produces AssertionFailed naming its
condition, as before.
duckdb_try! takes its message as `$msg:literal` rather than `$msg:expr`: a
fragment captured as expr cannot match vortex_err!'s literal matcher once
forwarded. Its message arms use Other, like its existing message-less arm,
since DuckDB's C API reports only a bare failure status.
Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7EtMqoZ91rrCCh9vS2yTm1 parent 29bc298 commit 58a9cd5
352 files changed
Lines changed: 1418 additions & 1333 deletions
File tree
- encodings
- alp/src
- alp_rd
- alp
- bytebool/src
- datetime-parts/src
- compute
- decimal-byte-parts
- benches
- common
- src/decimal_byte_parts
- plugin
- fastlanes/src
- bitpacking
- array
- vtable
- delta
- array
- vtable
- for
- array
- vtable
- rle
- array
- vtable
- fsst/src
- onpair/src
- parquet-variant/src
- pco/src
- runend/src
- sequence/src
- sparse/src
- zigzag/src
- zstd/src
- fuzz
- fuzz_targets
- src/array
- vortex-array
- benches
- src
- aggregate_fn
- fns
- bounded_max
- bounded_min
- min_max
- sum_v2
- sum
- arrays
- bool
- compute
- vtable
- chunked
- compute
- vtable
- constant/vtable
- decimal
- compute
- vtable
- dict
- vtable
- extension
- vtable
- filter
- fixed_size_list
- compute
- vtable
- fixed_width
- take
- interleave
- execute
- listview
- vtable
- list
- compute
- vtable
- map
- vtable
- masked/vtable
- null
- patched
- vtable
- piecewise_sequence
- primitive
- array
- vtable
- scalar_fn
- vtable
- slice
- struct_
- compute
- vtable
- union
- vtable
- varbinview
- compute
- vtable
- varbin
- compute
- vtable
- variant
- vtable
- array
- vtable
- builders
- dict
- compute/conformance
- dtype
- expr
- transform
- extension
- datetime
- tests
- uuid
- optimizer
- scalar_fn
- fns
- binary/numeric
- fill_null
- mask
- variant_get
- zip
- internal
- unstable/row
- batch
- execute
- execute
- types/element
- tuple
- visitor
- scalar
- typed_view
- extension
- primitive
- session
- stats
- test_harness/trace
- vortex-arrow/src
- executor
- vortex-bench/src
- vortex-btrblocks/src/schemes/float
- vortex-buffer/src
- vortex-compressor/src/stats
- vortex-cuda
- ffi/src
- src
- arrow
- kernel
- arrays
- encodings
- patches
- pooled_read_at
- file
- vortex-datafusion/src/convert
- vortex-duckdb/src
- convert
- duckdb
- exporter
- vortex-error
- src
- tests
- vortex-ffi/src
- vortex-file/src
- read
- segments
- vortex-io/src
- filesystem
- object_store
- runtime
- vortex-ipc/src/messages
- vortex-jni/src
- vortex-json/src
- vortex-layout/src
- layouts
- chunked
- dict
- flat
- list
- struct_
- zoned
- aggregates/bloom_filter
- partial
- plan
- optimizer
- plans
- scan
- vortex-mask/src
- vortex-python-cuda/src
- vortex-python/src
- arrays/py
- dtype
- vortex-scan/src
- vortex-session/src
- vortex-spatial/src
- extension
- scalar_fn
- vortex-tensor/src
- scalar_fns
- types
- fixed_shape_tensor
- vector
- vortex/benches
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
| 272 | + | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
| 279 | + | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments