Skip to content

Commit

Permalink
Simplify panic_with_felt252 related comment in errors.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenad committed Jun 2, 2024
1 parent b725695 commit c02a8e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch00/basics/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To throw an error, use the `assert` or `panic` functions:

- `panic` immediately halts the execution with the given error value.
It should be used for complex condition checks and for internal errors. It's similar to the `revert` statement in Solidity.
You can use `panic_with_felt252` to be able to directly pass a `felt252` as the error value.
You can use `panic_with_felt252` to directly pass a `felt252` as the error value.

The `assert_eq!`, `assert_ne!`, `assert_lt!`, `assert_le!`, `assert_gt!` and `assert_ge!` macros can be used as an `assert` shorthand to compare two values, but **only** in tests. In contracts, you should only use the `assert` function.

Expand Down

0 comments on commit c02a8e9

Please sign in to comment.