diff --git a/src/main.rs b/src/main.rs index cddc49f..dc21ce5 100755 --- a/src/main.rs +++ b/src/main.rs @@ -2226,7 +2226,7 @@ fn add_library() -> Task { Library::new(Arc::new(match res { Ok(db) => db, Err(e) => { - error!("{e}: {}", e.root_cause()); + error!("{e}"); panic!("{e}") } })), diff --git a/src/ui/library.rs b/src/ui/library.rs index c0544cd..2ff13b1 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -1271,7 +1271,7 @@ pub async fn add_db() -> Result { db_url.push_str(data.to_str().expect("Should always be a file here")); let opts = SqliteConnectOptions::from_str(&db_url) .into_diagnostic() - .wrap_err(format!("DB Url: {db_url}"))? + .context(format!("DB Url: {db_url}"))? .create_if_missing(true); SqlitePool::connect_with(opts).await.into_diagnostic() }