import jalview.io.HtmlSvgOutput;
import jalview.io.IdentifyFile;
import jalview.io.NewickFile;
+import jalview.io.exceptions.ImageOutputException;
import jalview.schemes.ColourSchemeI;
import jalview.schemes.ColourSchemeProperty;
import jalview.structure.StructureImportSettings.TFType;
Cache.setProperty("EXPORT_EMBBED_BIOJSON", "false");
Console.info("Writing " + file);
-
+ try {
switch (type)
{
+ "' not known. Ignoring");
break;
}
+ } catch (Exception ioex) {
+ Console.warn("Unexpected error during export",ioex);
+ }
}
}
return true;
import jalview.datamodel.AlignmentExportData;
import jalview.gui.AlignmentPanel;
import jalview.gui.IProgressIndicator;
+import jalview.io.exceptions.ImageOutputException;
import jalview.util.MessageManager;
public abstract class HTMLOutput implements Runnable
return generatedFile;
}
- public void exportHTML(String outputFile)
+ public void exportHTML(String outputFile) throws ImageOutputException
{
exportHTML(outputFile, null);
}
- public void exportHTML(String outputFile, String renderer)
+ public void exportHTML(String outputFile, String renderer) throws ImageOutputException
{
setProgressMessage(MessageManager.formatMessage(
"status.exporting_alignment_as_x_file", getDescription()));
}
// used to pass an option such as render to run
- public abstract void run(String string);
+ public abstract void run(String string) throws ImageOutputException;
}
\ No newline at end of file
--- /dev/null
+package jalview.io.exceptions;
+
+/**
+ * wrapper for passing error messages and exceptions back to UI when image io goes wrong
+ * @author jprocter
+ *
+ */
+public class ImageOutputException extends Exception
+{
+
+ public ImageOutputException()
+ {
+ }
+
+ public ImageOutputException(String message)
+ {
+ super(message);
+ }
+
+ public ImageOutputException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public ImageOutputException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ImageOutputException(String message, Throwable cause,
+ boolean enableSuppression, boolean writableStackTrace)
+ {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+
+}