Commits

Ian Grunert (Atlassian) committed 126eb9c

Handling the remaining exceptions.

Comments (0)

Files changed (1)

src/main/java/com/example/plugins/tutorial/jira/tabpanels/ConfluenceSpaceTabPanel.java

         }
         catch (ResponseException e)
         {
-            throw new RuntimeException(e);
+            return Collections.singletonList(new GenericMessageAction("Response exception. Message: " + e.getMessage()));
         }
         catch (ParserConfigurationException e)
         {
-            throw new RuntimeException(e);
+            return Collections.singletonList(new GenericMessageAction("Failed to read response from Confluence." + e.getMessage()));
         }
         catch (SAXException e)
         {
-            throw new RuntimeException(e);
+            return Collections.singletonList(new GenericMessageAction("Failed to read response from Confluence." + e.getMessage()));
         }
         catch (IOException e)
         {
-            throw new RuntimeException(e);
+            return Collections.singletonList(new GenericMessageAction("Failed to read response from Confluence." + e.getMessage()));
         }
     }