javadoc, and unimplemented warning for group associated annotation (not shared to...
[jalview.git] / src / jalview / io / FormatAdapter.java
index 6514e60..2735fb3 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -63,6 +63,8 @@ public class FormatAdapter extends AppletFormatAdapter
 
   /**
    * Format a vector of sequences as a flat alignment file.
+   * TODO: allow caller to detect errors and warnings encountered when generating output
+   *
    * 
    * @param format
    *                Format string as givien in the AppletFormatAdaptor list
@@ -130,8 +132,12 @@ public class FormatAdapter extends AppletFormatAdapter
        */
 
       afile.setSeqs(seqs);
-
-      return afile.print();
+      String afileresp = afile.print();
+      if (afile.hasWarningMessage())
+      {
+        System.err.println("Warning raised when writing as "+format+" : "+afile.getWarningMessage());
+      }
+      return afileresp;
     } catch (Exception e)
     {
       System.err.println("Failed to write alignment as a '" + format