Examples of ApiException


Examples of org.wikipediacleaner.api.APIException

      return shouldContinue(
          root, "/api/query-continue/categorymembers",
          properties);
    } catch (JDOMException e) {
      log.error("Error loading category members list", e);
      throw new APIException("Error parsing XML", e);
    }
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

        page.setPageId(xpaPageId.valueOf(currentNode));
        list.add(page);
      }
    } catch (JDOMException e) {
      log.error("Error loading random list", e);
      throw new APIException("Error parsing XML", e);
    }
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

        result = constructLogin(getRoot(properties, 1));
      }
      return result;
    } catch (JDOMParseException e) {
      log.error("Exception in MediaWikiAPI.login()", e);
      throw new APIException("Couldn't login");
    }
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

        XPath xpaDetails = XPath.newInstance("./@details");
        return LoginResult.createErrorLogin(result, xpaDetails.valueOf(node), xpaWait.valueOf(node));
      }
    } catch (JDOMException e) {
      log.error("Error login", e);
      throw new APIException("Error parsing XML result", e);
    }
    return LoginResult.createErrorLogin(null, null, null);
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

      return shouldContinue(
          root, "/api/query-continue/protectedtitles",
          properties);
    } catch (JDOMException e) {
      log.error("Error loading protected titles list", e);
      throw new APIException("Error parsing XML", e);
    }
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

      XPath xpaContents = XPath.newInstance("/api/expandtemplates/.");
      Element root = getRoot(properties, ApiRequest.MAX_ATTEMPTS);
      return xpaContents.valueOf(root);
    } catch (JDOMException e) {
      log.error("Error expanding templates", e);
      throw new APIException("Error parsing XML", e);
    }
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

      return shouldContinue(
          root, "/api/query-continue/langlinks",
          properties);
    } catch (JDOMException e) {
      log.error("Error updating disambiguation status", e);
      throw new APIException("Error parsing XML", e);
    }
  }
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

          page,
          getRoot(wikipedia, properties, ApiRequest.MAX_ATTEMPTS),
          "/api/query/pages/page");
    } catch (JDOMParseException e) {
      log.error("Error retrieving page content", e);
      throw new APIException("Error parsing XML", e);
    } catch (APIException e) {
      switch (e.getQueryResult()) {
      case RV_NO_SUCH_SECTION:
        // API Bug https://bugzilla.wikimedia.org/show_bug.cgi?id=26627
        page.setExisting(Boolean.FALSE);
View Full Code Here

Examples of org.wikipediacleaner.api.APIException

            pages,
            getRoot(wikipedia, properties, ApiRequest.MAX_ATTEMPTS),
            "/api/query/pages/page");
      } catch (JDOMParseException e) {
        log.error("Error retrieving redirects", e);
        throw new APIException("Error parsing XML", e);
      }
    }
  }
View Full Code Here

Examples of org.zaproxy.zap.extension.api.ApiException

    public ApiResponse handleApiAction(String name, JSONObject params) throws ApiException {

        if (ACTION_SET_REVEAL.equals(name)) {
            extension.setReveal(getParam(params, PARAM_REVEAL, false));
        } else {
            throw new ApiException(ApiException.Type.BAD_ACTION);
        }
        return ApiResponseElement.OK;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.