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 () =
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
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 () =
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 ()