diff --git a/schemsearch-cli/src/main.rs b/schemsearch-cli/src/main.rs index c2ad913..ec31e06 100644 --- a/schemsearch-cli/src/main.rs +++ b/schemsearch-cli/src/main.rs @@ -253,7 +253,14 @@ fn main() { } #[cfg(feature = "sql")] SchematicSupplierType::SQL(schem) => { - search_schempath(search_behavior, &pattern, &mut output_std, &mut output_std_csv, &mut output_file_csv, &mut output_file, &mut lock, &mut file_out, schem.get_schematic().unwrap(), schem.get_name()); + match schem.get_schematic() { + Ok(schematic) => { + search_schempath(search_behavior, &pattern, &mut output_std, &mut output_std_csv, &mut output_file_csv, &mut output_file, &mut lock, &mut file_out, schematic, schem.get_name()); + } + Err(e) => { + println!("Error while loading schematic ({}): {}", schem.get_name(), e.to_string()); + } + } } } }