Commit fdb03dc89258bde53e671b25419d2ebeeb1d28e9
1 parent
e288cc0a
Exists in
master
VOTable: Move try/catch to controller view.
Showing
1 changed file
with
5 additions
and
9 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableController.java
... | ... | @@ -43,7 +43,7 @@ public class VOTableController { |
43 | 43 | voTable = VOTableParser.parseVOTable(voTablePath); |
44 | 44 | fillView(); |
45 | 45 | } catch (Exception e) { |
46 | - view.displayError("VOTable can not be displayed", e.getMessage()); | |
46 | + view.displayError("VOTable can not be displayed.\nReason:\n", e.getMessage()); | |
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
... | ... | @@ -66,7 +66,7 @@ public class VOTableController { |
66 | 66 | voTable = VOTableParser.parseVOTable(voTablePath); |
67 | 67 | fillView(); |
68 | 68 | } catch (Exception e) { |
69 | - view.displayError("VOTable can not be displayed", e.getMessage()); | |
69 | + view.displayError("VOTable can not be displayed.\nReason:\n", e.getMessage()); | |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
... | ... | @@ -84,13 +84,9 @@ public class VOTableController { |
84 | 84 | throw new Exception("VOTable with more than one table are not yet supported."); |
85 | 85 | } |
86 | 86 | Table table = (Table) (voTable.getRESOURCE().get(0).getLINKAndTABLEOrRESOURCE().get(0)); |
87 | - try { | |
88 | - VOTableDataParser dataParser = new VOTableDataParser(table); | |
89 | - view.buildArray(dataParser.getColumnsName(), dataParser.getDataArray()); | |
90 | - } catch (Exception e) { | |
91 | - view.displayError("VOTable can not be displayed", | |
92 | - "Can not parse VOTable data.\nReason:\n" + e.getMessage()); | |
93 | - } | |
87 | + | |
88 | + VOTableDataParser dataParser = new VOTableDataParser(table); | |
89 | + view.buildArray(dataParser.getColumnsName(), dataParser.getDataArray()); | |
94 | 90 | } |
95 | 91 | |
96 | 92 | /** | ... | ... |