chore: replace panic! with internal_error!

This commit is contained in:
Luca Cervello 2022-10-11 11:52:08 +02:00
parent b3ab54ac90
commit c39103d6d0
No known key found for this signature in database
GPG key ID: 05180DD59F7580C4
8 changed files with 45 additions and 27 deletions

View file

@ -16,6 +16,8 @@ use roc_mono::layout::{
Builtin, CapturesNiche, Layout, RawFunctionLayout, STLayoutInterner, UnionLayout,
};
use roc_error_macros::internal_error;
// just using one module for now
pub const MOD_APP: ModName = ModName(b"UserApp");
@ -603,9 +605,10 @@ fn build_tuple_value(
for field in symbols.iter() {
let value_id = match env.symbols.get(field) {
None => panic!(
None => internal_error!(
"Symbol {:?} is not defined in environment {:?}",
field, &env.symbols
field,
&env.symbols
),
Some(x) => *x,
};