JAL-3628 Fixed oddly worded and non-formatted error popups when saving fails
[jalview.git] / src / jalview / io / BackupFiles.java
index 11d1a16..7567a81 100644 (file)
@@ -152,11 +152,11 @@ public class BackupFiles
       Cache.log
               .error("Could not create temp file to save to (IOException)");
       Cache.log.error(e.getMessage());
-      Cache.log.debug(e.getStackTrace());
+      Cache.log.debug(Cache.getStackTraceString(e));
     } catch (Exception e)
     {
       Cache.log.error("Exception creating temp file for saving");
-      Cache.log.debug(e.getStackTrace());
+      Cache.log.debug(Cache.getStackTraceString(e));
     }
     this.setTempFile(temp);
   }
@@ -218,7 +218,7 @@ public class BackupFiles
       Cache.log.error(
               "IOException when getting Canonical Path of temp file '"
                       + this.getTempFile().getName() + "'");
-      Cache.log.debug(e.getStackTrace());
+      Cache.log.debug(Cache.getStackTraceString(e));
     }
     return path;
   }
@@ -276,7 +276,7 @@ public class BackupFiles
       Cache.log.error(
               "Could not get canonical path for file '" + file + "'");
       Cache.log.error(e.getMessage());
-      Cache.log.debug(e.getStackTrace());
+      Cache.log.debug(Cache.getStackTraceString(e));
       return false;
     }
     String filename = file.getName();
@@ -416,7 +416,7 @@ public class BackupFiles
               Cache.log.error(
                       "Error occurred, probably making new temp file for '"
                               + fileToBeDeleted.getName() + "'");
-              Cache.log.error(e.getStackTrace());
+              Cache.log.error(Cache.getStackTraceString(e));
             }
 
             // reset
@@ -800,6 +800,12 @@ public class BackupFiles
                 "label.backupfiles_confirm_save_new_saved_file_not_ok"));
         // "The new saved file might not be okay."
       }
+      if (messageSB.length() > 0)
+      {
+        messageSB.append("\n");
+      }
+      messageSB
+              .append(MessageManager.getString("label.continue_operation"));
 
       int confirmButton = Platform.isHeadless() ? JvOptionPane.OK_OPTION
               : JvOptionPane.showConfirmDialog(Desktop.desktop,
@@ -907,12 +913,12 @@ public class BackupFiles
       Cache.log.warn("Could not move file '" + oldPath.toString() + "' to '"
               + newPath.toString() + "'");
       Cache.log.error(e.getMessage());
-      Cache.log.debug(e.getStackTrace());
+      Cache.log.debug(Cache.getStackTraceString(e));
       ret = false;
     } catch (Exception e)
     {
       Cache.log.error(e.getMessage());
-      Cache.log.debug(e.getStackTrace());
+      Cache.log.debug(Cache.getStackTraceString(e));
       ret = false;
     }
     return ret;