Examples of ActionFailedException


Examples of com.cedarsoft.couchdb.ActionFailedException

      AbstractJacksonSerializer.nextFieldValue( parser, PROPERTY_REASON );
      String reason = parser.getText();
      AbstractJacksonSerializer.closeObject( parser );
      AbstractJacksonSerializer.ensureParserClosedObject( parser );

      return new ActionFailedException( status, error, reason, teedOut.toByteArray() );
    }
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.ActionFailedException

    JsonFactory jsonFactory = JacksonSupport.getJsonFactory();

    JsonParser parser = jsonFactory.createJsonParser( in );
    AbstractJacksonSerializer.nextToken( parser, JsonToken.START_OBJECT );

    ActionFailedException deserialized = deserialize( status, parser );

    AbstractJacksonSerializer.ensureParserClosedObject( parser );

    return deserialized;
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.ActionFailedException

    AbstractJacksonSerializer.nextFieldValue( deserializeFrom, PROPERTY_ERROR );
    String error = deserializeFrom.getText();
    AbstractJacksonSerializer.nextFieldValue( deserializeFrom, PROPERTY_REASON );
    String reason = deserializeFrom.getText();
    AbstractJacksonSerializer.closeObject( deserializeFrom );
    return new ActionFailedException( status, error, reason );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.ActionFailedException

      JsonFactory jsonFactory = JacksonSupport.getJsonFactory();

      JsonParser parser = jsonFactory.createJsonParser( in );
      AbstractJacksonSerializer.nextToken( parser, JsonToken.START_OBJECT );

      ActionFailedException deserialized = deserialize( status, parser );

      AbstractJacksonSerializer.ensureParserClosedObject( parser );

      return deserialized;
    } catch ( IOException e ) {
View Full Code Here

Examples of com.cedarsoft.couchdb.ActionFailedException

    AbstractJacksonSerializer.nextFieldValue( deserializeFrom, PROPERTY_ERROR );
    String error = deserializeFrom.getText();
    AbstractJacksonSerializer.nextFieldValue( deserializeFrom, PROPERTY_REASON );
    String reason = deserializeFrom.getText();
    AbstractJacksonSerializer.closeObject( deserializeFrom );
    return new ActionFailedException( status, error, reason );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.ActionFailedException

      JsonFactory jsonFactory = JacksonSupport.getJsonFactory();

      JsonParser parser = jsonFactory.createJsonParser( in );
      AbstractJacksonSerializer.nextToken( parser, JsonToken.START_OBJECT );

      ActionFailedException deserialized = deserialize( status, parser );

      AbstractJacksonSerializer.ensureParserClosedObject( parser );

      return deserialized;
    } catch ( IOException e ) {
View Full Code Here

Examples of com.cedarsoft.couchdb.ActionFailedException

    AbstractJacksonSerializer.nextFieldValue( deserializeFrom, PROPERTY_ERROR );
    String error = deserializeFrom.getText();
    AbstractJacksonSerializer.nextFieldValue( deserializeFrom, PROPERTY_REASON );
    String reason = deserializeFrom.getText();
    AbstractJacksonSerializer.closeObject( deserializeFrom );
    return new ActionFailedException( status, error, reason );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.core.ActionFailedException

    if ( !ActionResponse.isNotSuccessful( response ) ) {
      return;
    }

    if ( !response.hasEntity() ) {
      throw new ActionFailedException( response.getStatus(), "unknown", "unknown", null );
    }

    try {
      try ( InputStream inputStream = response.getEntityInputStream() ) {
        throw new ActionFailedExceptionSerializer().deserialize( response.getStatus(), inputStream );
View Full Code Here

Examples of com.cedarsoft.couchdb.core.ActionFailedException

      assert reason != null;
      assert error != null;

      parserWrapper.ensureObjectClosed();

      return new ActionFailedException( status, error, reason, teedOut.toByteArray() );
    }
  }
View Full Code Here

Examples of com.github.jreddit.exception.ActionFailedException

          .withUrl(ApiEndpointUtils.REDDIT_BASE_URL + urlPath)
          .withCookie(cookie),
          convertRequestStringToList(apiParams)
      );
      if (result == null) {
        throw new ActionFailedException("Due to unknown reasons, the response was undefined for URI path: " + urlPath);
      } else {
        return result;
      }
    } catch (URISyntaxException e) {
      throw new ActionFailedException("The syntax of the URI path was incorrect: " + urlPath);
    } catch (IOException e) {
      throw new ActionFailedException("Input/output failed when retrieving from URI path: " + urlPath);
    } catch (ParseException e) {
      throw new ActionFailedException("Failed to parse the response from GET request to URI path: "+ urlPath);
    }
   
  }
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.