question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Small mistake in precondition check example

See original GitHub issue
checkArgument(i < j, "Expected i < j, but %s > %s", i, j);

should be

checkArgument(i < j, "Expected i < j, but %s >= %s", i, j);

😉 🤓

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
michalfotygacommented, Apr 14, 2018
0reactions
jrtomcommented, Apr 14, 2018

I’ve fixed it. Thanks for the catch! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to track down "precondition failure: attribute failed to set ...
I recently see sometimes crashing errors with statements like "precondition failure: attribute failed to set an initial value: 103" logged to the console....
Read more >
Best way to handle a typical precondition exception?
Note: The File existence check is just an example of a precondition to HANDLE. Clearly, there is a good case for letting File...
Read more >
Reasoning About Code, Part 1 - Williams College
A precondition is an assertion inserted prior to execution, and a postcondition is an assertion inserted after execution. In the example above, ...
Read more >
Pattern for costly precondition check before acting
Use the first example whenever possible. This way it's near impossible to forget the check or to forget to handle the error.
Read more >
Preconditions — Part I | Andrzej's C++ blog - WordPress.com
Violating a precondition is conceptually similar to dereferencing a null pointer. A function simply works under the assumption that certain ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found