Search in sources :

Example 1 with RequestFailedException

use of com.intellij.tasks.impl.RequestFailedException in project intellij-community by JetBrains.

the class BugzillaRepository method ensureVersionDiscovered.

private void ensureVersionDiscovered() throws Exception {
    if (myVersion == null) {
        Hashtable<String, Object> result = new BugzillaXmlRpcRequest("Bugzilla.version").execute();
        if (result == null) {
            throw new RequestFailedException(TaskBundle.message("bugzilla.failure.no.version"));
        }
        String version = (String) result.get("version");
        String[] parts = version.split("\\.", 3);
        myVersion = new Version(Integer.parseInt(parts[0]), parts.length > 1 ? Integer.parseInt(parts[1]) : 0, parts.length > 2 ? Integer.parseInt(parts[2]) : 0);
        if (myVersion.lessThan(3, 4)) {
            throw new RequestFailedException("Bugzilla before 3.4 is not supported");
        }
    }
}
Also used : RequestFailedException(com.intellij.tasks.impl.RequestFailedException) Version(com.intellij.openapi.util.Version)

Aggregations

Version (com.intellij.openapi.util.Version)1 RequestFailedException (com.intellij.tasks.impl.RequestFailedException)1