X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaUI%2FGUI.fs;h=35bc2ad4ceac3206621058683b8c26104392db22;hp=0a93d90367cd6e46ca268d021670594a70a88390;hb=e8d14548fc5b127970fccb19bad146512f7ac6d9;hpb=e2517b9837d5c82e003bc3aa7b27040636cea6f0 diff --git a/Parasitemia/ParasitemiaUI/GUI.fs b/Parasitemia/ParasitemiaUI/GUI.fs index 0a93d90..35bc2ad 100644 --- a/Parasitemia/ParasitemiaUI/GUI.fs +++ b/Parasitemia/ParasitemiaUI/GUI.fs @@ -266,7 +266,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) = displayStatusMessage "Document saved" with | :? IOException as ex -> - Log.Error(ex.ToString()) + Log.Error "%O" ex MessageBox.Show(sprintf "The document cannot be save in \"%s\"" state.FilePath, "Error saving the document", MessageBoxButton.OK, MessageBoxImage.Error) |> ignore let saveCurrentDocumentAsNewFile () = @@ -384,7 +384,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) = updateGUI () with | :? IOException as ex -> - Log.Error(ex.ToString()) + Log.Error "%O" ex state.FilePath <- previousFilePath MessageBox.Show(sprintf "The document cannot be loaded from \"%s\"" filepath, "Error loading the document", MessageBoxButton.OK, MessageBoxImage.Error) |> ignore @@ -414,7 +414,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) = Export.exportResults state dialog.FileName with | :? IOException as ex -> - Log.Error(ex.ToString()) + Log.Error "%O" ex MessageBox.Show(sprintf "The results cannot be exported in \"%s\"" state.FilePath, "Error exporting the files", MessageBoxButton.OK, MessageBoxImage.Error) |> ignore let importImage () = @@ -429,7 +429,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) = addPreview srcImg with | _ as ex -> - Log.Error(ex.ToString()) + Log.Error "%O" ex MessageBox.Show(sprintf "Unable to read the image from \"%s\"" filename, "Error adding an image", MessageBoxButton.OK, MessageBoxImage.Error) |> ignore updateGlobalParasitemia ()