git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7fd7bf6
)
JAL-1499 consistent use of FileFormatException
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 8 Oct 2015 09:51:42 +0000
(10:51 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 8 Oct 2015 09:51:42 +0000
(10:51 +0100)
src/jalview/io/MegaFile.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/MegaFile.java
b/src/jalview/io/MegaFile.java
index
97d7775
..
fcb7a93
100644
(file)
--- a/
src/jalview/io/MegaFile.java
+++ b/
src/jalview/io/MegaFile.java
@@
-659,9
+659,9
@@
public class MegaFile extends AlignFile
* Comments in MEGA are within [ ] brackets, and may be nested.
*
* @return
* Comments in MEGA are within [ ] brackets, and may be nested.
*
* @return
- * @throws IOException
+ * @throws FileFormatException
*/
*/
- protected String nextNonCommentLine() throws IOException
+ protected String nextNonCommentLine() throws FileFormatException
{
return nextNonCommentLine(0);
}
{
return nextNonCommentLine(0);
}
@@
-675,12
+675,19
@@
public class MegaFile extends AlignFile
* @param depth
* current depth of nesting of comments while parsing
* @return
* @param depth
* current depth of nesting of comments while parsing
* @return
- * @throws IOException
+ * @throws FileFormatException
*/
*/
- protected String nextNonCommentLine(final int depth) throws IOException
+ protected String nextNonCommentLine(final int depth)
+ throws FileFormatException
{
String data = null;
{
String data = null;
- data = nextLine();
+ try
+ {
+ data = nextLine();
+ } catch (IOException e)
+ {
+ throw new FileFormatException(e.getMessage());
+ }
if (data == null)
{
if (depth > 0)
if (data == null)
{
if (depth > 0)
@@
-817,10
+824,10
@@
public class MegaFile extends AlignFile
*
* @param dataLine
* @return
*
* @param dataLine
* @return
- * @throws IOException
+ * @throws FileFormatException
*/
protected String parseDataLine(String dataLine)
*/
protected String parseDataLine(String dataLine)
- throws IOException
+ throws FileFormatException
{
String seqId = getSequenceId(dataLine);
if (seqId == null)
{
String seqId = getSequenceId(dataLine);
if (seqId == null)
@@
-853,7
+860,7
@@
public class MegaFile extends AlignFile
* a new one if we haven't seen it before.
*
* @param dataLine
* a new one if we haven't seen it before.
*
* @param dataLine
- * @throws IOException
+ * @throws FileFormatException
*/
protected void parseNoninterleavedDataLine(String dataLine)
throws FileFormatException
*/
protected void parseNoninterleavedDataLine(String dataLine)
throws FileFormatException
@@
-1021,9
+1028,9
@@
public class MegaFile extends AlignFile
* Save as alignment properties in case useful.
*
* @return the next non-blank line following the header lines.
* Save as alignment properties in case useful.
*
* @return the next non-blank line following the header lines.
- * @throws IOException
+ * @throws FileFormatException
*/
*/
- protected String parseHeaderLines() throws IOException
+ protected String parseHeaderLines() throws FileFormatException
{
String inputLine = null;
while ((inputLine = nextNonCommentLine()) != null)
{
String inputLine = null;
while ((inputLine = nextNonCommentLine()) != null)
@@
-1075,9
+1082,9
@@
public class MegaFile extends AlignFile
* semicolon.
*
* @param inputLine
* semicolon.
*
* @param inputLine
- * @throws IOException
+ * @throws FileFormatException
*/
*/
- protected void parseFormat(String inputLine) throws IOException
+ protected void parseFormat(String inputLine) throws FileFormatException
{
while (inputLine != null)
{
{
while (inputLine != null)
{
@@
-1292,10
+1299,10
@@
public class MegaFile extends AlignFile
* Reads lines until terminated by semicolon, appending each to the
* Description property value.
*
* Reads lines until terminated by semicolon, appending each to the
* Description property value.
*
- * @throws IOException
+ * @throws FileFormatException
*/
protected void parseDescription(String firstDescriptionLine)
*/
protected void parseDescription(String firstDescriptionLine)
- throws IOException
+ throws FileFormatException
{
StringBuilder desc = new StringBuilder(256);
desc.append(getValue(firstDescriptionLine));
{
StringBuilder desc = new StringBuilder(256);
desc.append(getValue(firstDescriptionLine));
@@
-1588,7
+1595,7
@@
public class MegaFile extends AlignFile
*
* @param isIt
* @param dataLine
*
* @param isIt
* @param dataLine
- * @throws IOException
+ * @throws FileFormatException
*/
protected void assertInterleaved(boolean isIt, String dataLine)
throws FileFormatException
*/
protected void assertInterleaved(boolean isIt, String dataLine)
throws FileFormatException