Display backtraces for logged errors

This commit is contained in:
Elias Projahn 2025-03-13 18:44:01 +01:00
parent 6876a6edd7
commit 9c893fba9e
8 changed files with 16 additions and 16 deletions

View file

@ -78,7 +78,7 @@ mod imp {
.collect::<Vec<PlaylistItem>>();
if let Err(err) = obj.player().append(playlist) {
log::warn!("Failed to add album to the playlits: {err}");
log::warn!("Failed to add album to the playlits: {err:?}");
};
})
.build();

View file

@ -170,7 +170,7 @@ impl TracksEditor {
match dialog.open_multiple_future(Some(window)).await {
Err(err) => {
if !err.matches(gtk::DialogError::Dismissed) {
log::error!("File selection failed: {err}");
log::error!("File selection failed: {err:?}");
}
}
Ok(files) => {

View file

@ -101,7 +101,7 @@ impl Library {
this_connection,
&sender,
))) {
log::error!("Failed to send library action result: {err}");
log::error!("Failed to send library action result: {err:?}");
}
});
@ -128,7 +128,7 @@ impl Library {
tracks,
&sender,
))) {
log::error!("Failed to send library action result: {err}");
log::error!("Failed to send library action result: {err:?}");
}
});

View file

@ -96,7 +96,7 @@ impl LibraryManager {
match dialog.select_folder_future(Some(window)).await {
Err(err) => {
if !err.matches(gtk::DialogError::Dismissed) {
log::error!("Folder selection failed: {err}");
log::error!("Folder selection failed: {err:?}");
}
}
Ok(folder) => window.set_library_folder(&folder),
@ -120,7 +120,7 @@ impl LibraryManager {
match dialog.open_future(Some(window)).await {
Err(err) => {
if !err.matches(gtk::DialogError::Dismissed) {
log::error!("File selection failed: {err}");
log::error!("File selection failed: {err:?}");
}
}
Ok(path) => {
@ -154,7 +154,7 @@ impl LibraryManager {
self.add_process(&process);
}
Err(err) => log::error!("Failed to import library: {err}"),
Err(err) => log::error!("Failed to import library: {err:?}"),
}
}
}
@ -178,7 +178,7 @@ impl LibraryManager {
match dialog.save_future(Some(window)).await {
Err(err) => {
if !err.matches(gtk::DialogError::Dismissed) {
log::error!("File selection failed: {err}");
log::error!("File selection failed: {err:?}");
}
}
Ok(path) => {
@ -204,7 +204,7 @@ impl LibraryManager {
self.add_process(&process);
}
Err(err) => log::error!("Failed to export library: {err}"),
Err(err) => log::error!("Failed to export library: {err:?}"),
}
}
}

View file

@ -63,7 +63,7 @@ mod imp {
self.obj().pause();
}
Err(err) => {
log::warn!("Failed to play from program: {err}");
log::warn!("Failed to play from program: {err:?}");
}
}
}
@ -317,7 +317,7 @@ impl Player {
self.play();
}
Err(err) => {
log::warn!("Failed to append and play items: {err}");
log::warn!("Failed to append and play items: {err:?}");
}
}
}
@ -332,7 +332,7 @@ impl Player {
self.play();
}
Err(err) => {
log::warn!("Failed to play from program: {err}");
log::warn!("Failed to play from program: {err:?}");
}
}
}
@ -403,7 +403,7 @@ impl Player {
} else if let Some(program) = self.program() {
match self.generate_items(&program) {
Ok(index) => self.set_current_index(index),
Err(err) => log::warn!("Failed to continue playing from program: {err}"),
Err(err) => log::warn!("Failed to continue playing from program: {err:?}"),
}
}
}

View file

@ -52,7 +52,7 @@ mod imp {
let player = obj.imp().player.get().unwrap();
let playlist = player.recording_to_playlist(obj.imp().recording.get().unwrap());
if let Err(err) = player.append(playlist) {
log::error!("Failed to add recording to playlist: {err}");
log::error!("Failed to add recording to playlist: {err:?}");
}
})
.build();

View file

@ -80,7 +80,7 @@ impl WelcomePage {
{
Err(err) => {
if !err.matches(gtk::DialogError::Dismissed) {
log::error!("Folder selection failed: {err}");
log::error!("Folder selection failed: {err:?}");
}
}
Ok(folder) => {

View file

@ -172,7 +172,7 @@ mod imp {
glib::signal::Propagation::Stop
} else {
if let Err(err) = self.obj().save_window_state() {
log::warn!("Failed to save window state: {err}");
log::warn!("Failed to save window state: {err:?}");
}
glib::signal::Propagation::Proceed