Examples of TranscodingException


Examples of com.couchbase.client.java.error.TranscodingException

            }

            if (ex instanceof TranscodingException) {
                throw (TranscodingException) ex;
            } else {
                throw new TranscodingException("Could not decode document with ID " + id, ex);
            }
        }
    }
View Full Code Here

Examples of com.couchbase.client.java.error.TranscodingException

            return doEncode(document);
        } catch(Exception ex) {
            if (ex instanceof TranscodingException) {
                throw (TranscodingException) ex;
            } else {
                throw new TranscodingException("Could not encode document with ID " + document.id(), ex);
            }
        }
    }
View Full Code Here

Examples of com.couchbase.client.java.error.TranscodingException

    @Override
    protected JsonDocument doDecode(String id, ByteBuf content, long cas, int expiry, int flags, ResponseStatus status)
        throws Exception {
        if (!TranscoderUtils.hasJsonFlags(flags)) {
            throw new TranscodingException("Flags (0x" + Integer.toHexString(flags) + ") indicate non-JSON document for "
                + "id " + id + ", could not decode.");
        }

        JsonObject converted = stringToJsonObject(content.toString(CharsetUtil.UTF_8));
        return newDocument(id, expiry, converted, cas);
View Full Code Here

Examples of com.couchbase.client.java.error.TranscodingException

    @Override
    protected BinaryDocument doDecode(String id, ByteBuf content, long cas, int expiry, int flags,
        ResponseStatus status) throws Exception {
        if (!TranscoderUtils.hasBinaryFlags(flags)) {
            throw new TranscodingException("Flags (0x" + Integer.toHexString(flags) + ") indicate non-binary " +
                "document for id " + id + ", could not decode.");
        }
        return BinaryDocument.create(id, expiry, content, cas);
    }
View Full Code Here

Examples of com.couchbase.client.java.error.TranscodingException

                @Override
                public ClusterInfo call(ClusterConfigResponse response) {
                    try {
                        return new DefaultClusterInfo(CouchbaseAsyncBucket.JSON_OBJECT_TRANSCODER.stringToJsonObject(response.config()));
                    } catch (Exception e) {
                        throw new TranscodingException("Could not decode cluster info.", e);
                    }
                }
            });
    }
View Full Code Here

Examples of com.couchbase.client.java.error.TranscodingException

                                .password(bucket.getString("saslPassword"))
                                .build());
                        }
                        return Observable.from(settings);
                    } catch (Exception e) {
                        throw new TranscodingException("Could not decode cluster info.", e);
                    }
                }
            });
    }
View Full Code Here

Examples of com.subhajit.diagrams.datatypes.graph.TranscodingException

      Graph<String[]> temp = new Graph<String[]>();
      strategy.convert(temp, classLoader,inputNode
          .getClassName());
      return temp.getUserData();
    } catch (RuntimeException exc) {
      throw new TranscodingException(exc);
    }
  }
View Full Code Here

Examples of com.subhajit.diagrams.datatypes.graph.TranscodingException

                                      input
                                          .getClassName());
                              return temp
                                  .getUserData();
                            } catch (RuntimeException exc) {
                              throw new TranscodingException(
                                  exc);
                            }
                          }
                        }), new File(output));
      } else if (digest != null) {
        File digestFile = new File(digest);
        if (!digestFile.isAbsolute()) {
          digestFile = new File(getProject().getBaseDir(), digest);
        }
        if (!digestFile.exists()) {
          throw new IllegalArgumentException(
              "Cannot continue, since digest file not found - "
                  + digestFile.getAbsolutePath());
        }
        @SuppressWarnings("unchecked")
        Map<String, ClassMetaData> map = (Map<String, ClassMetaData>) FileUtils
            .loadSerializableObjectFromFile(digestFile);
        System.out.println(getClass().getName()
            + ".execute. classpathElements - " + classpathElements);
        final URLClassLoader urlClassLoader = ClassUtils
            .newURLClassLoader(classpathElements, null);
        final ClassHierarchyProcessor finder = new ClassHierarchyProcessor(
            urlClassLoader, map);
        @SuppressWarnings("unused")
        final Repository repository = new ClassLoaderRepository(
            urlClassLoader);
        final ClassRenderingStrategy strategy = DefaultClassRenderingStrategy.SHOW_ALL_DECLARED_METHODS;
        CallGraphGeneratorUtils
            .draw(
                new GraphTranscoder<ClassMetaData, String[]>()
                    .transcode(
                        finder.computeGraph(className),
                        new NodeConversionStrategy<ClassMetaData, String[]>() {
                          public String[] convert(
                              ClassMetaData input) {
                            try {
                              Graph<String[]> temp = new Graph<String[]>();
                              strategy
                                  .convert(
                                      temp,
                                      urlClassLoader,
                                      input
                                          .getClassName());
                              return temp
                                  .getUserData();
                            } catch (RuntimeException exc) {
                              throw new TranscodingException(
                                  exc);
                            }
                          }
                        }), new File(output));
      } else {
View Full Code Here

Examples of com.volantis.mcs.integration.TranscodingException

        // Add in the width parameter
        if (tURLPP.getWidthParameterName() != null) {
            addWidth(rule, value, ctx.getWidth(), ctx.getContext());
        } else {
            // MCSMI0005X="The width parameter is mandatory but is unnamed in {1}"
            throw new TranscodingException(
                    exceptionLocalizer.format("width-mandatory",
                            getClass().getName()));
        }
       
        // Add in the height parameter if it exists
View Full Code Here

Examples of com.volantis.mcs.integration.TranscodingException

                    rule.replace(0, rule.length(), MONO_WBMP);
                } else {
                    // Neither PNG nor WBMP is supported so we'll have to
                    // throw a wobbler
                    logger.error("gif-rule-no-alternative", new Object[]{ruleValue});                   
                    throw new TranscodingException(exceptionLocalizer.format(
                                "gif-rule-no-alternative-2",
                                new Object[]{ruleValue,
                                             context.getDeviceName()}));
                }
            }
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.