Skip to content

Commit

Permalink
Add support for user errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp authored and David Peter committed Oct 8, 2023
1 parent 92e4188 commit c1ebdc8
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 68 deletions.
3 changes: 3 additions & 0 deletions numbat/modules/core/error.nbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TODO: Ideally, this function should have a '-> !' return type such that
# it can be used everywhere. Not just instead of a Scalar.
fn error(message: str) -> 1
1 change: 1 addition & 0 deletions numbat/modules/prelude.nbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use core::scalar
use core::quantities
use core::dimensions
use core::strings
use core::error

use math::constants
use math::functions
Expand Down
Loading

0 comments on commit c1ebdc8

Please sign in to comment.