Skip to content

redo (assert) for better error messages - #274

Merged
vito merged 2 commits into
mainfrom
better-assert
Apr 8, 2023
Merged

vito merged 2 commits into
mainfrom
better-assert

Conversation

@vito

@vito vito commented Apr 8, 2023

Copy link
Copy Markdown
Owner

Old: (assert (= 1 foo)), error: assertion failed: (= 1 foo)

New: (assert = 1 foo), error: assertion failed: (= 1 2)

It's also marked as ^:indent meaning you can format it like this:

(assert = "1,2,3"
  (strings:join "," [1 2 3]))

Old:

  (assert (= 1 foo))
  error: `assertion failed: (= 1 foo)`

New:

  (assert = 1 foo)
  error: `assertion failed: (= 1 2)`

It's also marked as `^:indent` meaning you can format it like this:

  (assert = "1,2,3"
    (strings:join "," [1 2 3]))
@vito
vito force-pushed the better-assert branch 4 times, most recently from 7381ff0 to a9fd03d Compare April 8, 2023 03:03
@vito
vito merged commit 5b1bba7 into main Apr 8, 2023
@vito
vito deleted the better-assert branch April 8, 2023 03:14
@vito vito added enhancement New feature or request breaking Removes or replaces previously supported functionality labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Removes or replaces previously supported functionality enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant