feat: add hostname and full_hostname meta plugins with error handling
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -172,10 +172,16 @@ pub fn mode_save(
|
||||
for meta_plugin in meta_plugins.iter_mut() {
|
||||
let meta_name = meta_plugin.meta_name();
|
||||
|
||||
// TODO: Add error handling instead of unwrap.
|
||||
let meta_value = meta_plugin.finalize().unwrap();
|
||||
|
||||
store_item_meta_value(conn, item.clone(), meta_name, meta_value)?;
|
||||
match meta_plugin.finalize() {
|
||||
Ok(meta_value) => {
|
||||
if let Err(e) = store_item_meta_value(conn, item.clone(), meta_name, meta_value) {
|
||||
eprintln!("Warning: Failed to store meta value for {}: {}", meta_name, e);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Warning: Failed to finalize meta plugin {}: {}", meta_name, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
db::update_item(conn, item.clone())?;
|
||||
|
||||
Reference in New Issue
Block a user