mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Eliminate Stmt::RuntimeError in favor of crash
This commit is contained in:
parent
a2f2a18a76
commit
803d7e30e3
14 changed files with 115 additions and 130 deletions
|
@ -41,9 +41,9 @@ use crate::llvm::{
|
|||
},
|
||||
};
|
||||
|
||||
use super::convert::zig_with_overflow_roc_dec;
|
||||
use super::{build::throw_internal_exception, convert::zig_with_overflow_roc_dec};
|
||||
use super::{
|
||||
build::{load_symbol, load_symbol_and_layout, throw_exception, Env, Scope},
|
||||
build::{load_symbol, load_symbol_and_layout, Env, Scope},
|
||||
convert::zig_dec_type,
|
||||
};
|
||||
|
||||
|
@ -1557,7 +1557,7 @@ fn throw_on_overflow<'a, 'ctx, 'env>(
|
|||
|
||||
bd.position_at_end(throw_block);
|
||||
|
||||
throw_exception(env, parent, message);
|
||||
throw_internal_exception(env, parent, message);
|
||||
|
||||
bd.position_at_end(then_block);
|
||||
|
||||
|
@ -2003,7 +2003,7 @@ fn int_neg_raise_on_overflow<'a, 'ctx, 'env>(
|
|||
|
||||
builder.position_at_end(then_block);
|
||||
|
||||
throw_exception(
|
||||
throw_internal_exception(
|
||||
env,
|
||||
parent,
|
||||
"integer negation overflowed because its argument is the minimum value",
|
||||
|
@ -2034,7 +2034,7 @@ fn int_abs_raise_on_overflow<'a, 'ctx, 'env>(
|
|||
|
||||
builder.position_at_end(then_block);
|
||||
|
||||
throw_exception(
|
||||
throw_internal_exception(
|
||||
env,
|
||||
parent,
|
||||
"integer absolute overflowed because its argument is the minimum value",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue