1
0
Fork 0

#117 Changed Version merge and copy methods to throw a JiraException from consistency.

master
Joseph McCarthy 2015-12-26 20:04:51 +00:00
parent 12f11ce2c3
commit 61d666c694
1 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public class Version extends Resource {
* @param version
* The version to merge
*/
public void mergeWith(Version version) {
public void mergeWith(Version version) throws JiraException {
JSONObject req = new JSONObject();
req.put("description", version.getDescription());
@ -66,7 +66,7 @@ public class Version extends Resource {
try {
restclient.put(Resource.getBaseUri() + "version/" + id, req);
} catch (Exception ex) {
throw new RuntimeException("Failed to merge", ex);
throw new JiraException("Failed to merge", ex);
}
}
@ -76,7 +76,7 @@ public class Version extends Resource {
* @param project
* The project the version will be copied to
*/
public void copyTo(Project project) {
public void copyTo(Project project) throws JiraException {
JSONObject req = new JSONObject();
req.put("description", getDescription());
@ -90,7 +90,7 @@ public class Version extends Resource {
try {
restclient.post(Resource.getBaseUri() + "version/", req);
} catch (Exception ex) {
throw new RuntimeException("Failed to copy to project '" + project.getKey() + "'", ex);
throw new JiraException("Failed to copy to project '" + project.getKey() + "'", ex);
}
}