Clean up handling of nonexistent symbol tables

This commit is contained in:
pjht 2022-10-24 08:45:38 -05:00
parent 419fa6a2ab
commit a3b1178fd3
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ fn main() -> Result<(), anyhow::Error> {
let mut symbol_tables = SymbolTables::new();
if let Some(initial_tables) = config.symbol_tables {
for path in initial_tables {
symbol_tables.load_table(path, true).unwrap();
symbol_tables.load_table(path, true)?;
}
}
Repl::<_, anyhow::Error>::new(EmuState {

View File

@ -27,7 +27,7 @@ impl SymbolTable {
let mut file = elf::File::open_stream(&mut cached_reader)?;
let (symtab, symstrtab) = file
.symbol_table()?
.ok_or_else(|| anyhow!("No symbol table in file"))?;
.ok_or_else(|| anyhow!("No symbol table in {}", path))?;
let symbols = symtab
.iter()
.skip(1)