Skip to content

Commit

Permalink
fix: show more explicative error when built-in module is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Feb 29, 2024
1 parent ce6f7e8 commit 7b5e994
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/scanner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,11 @@ impl<'r> Scanner<'r> {

for module_name in ctx.compiled_rules.imports() {
// Lookup the module in the list of built-in modules.
let module = modules::BUILTIN_MODULES.get(module_name).unwrap();
let module =
modules::BUILTIN_MODULES.get(module_name).unwrap_or_else(
|| panic!("module `{}` not found", module_name),
);

let root_struct_name = module.root_struct_descriptor.full_name();

// If the user already provided some output for the module by
Expand Down

0 comments on commit 7b5e994

Please sign in to comment.