Examples of YamlException


Examples of com.esotericsoftware.yamlbeans.YamlException

  public Date read (String value) throws YamlException {
    try {
      return dateParser.parse(value);
    } catch (ParseException ex) {
      throw new YamlException("Invalid date: " + value, ex);
    }
  }
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.YamlException

  public Date read (String value) throws YamlException {
    try {
      return dateParser.parse(value);
    } catch (ParseException ex) {
      throw new YamlException("Invalid date: " + value, ex);
    }
  }
View Full Code Here

Examples of net.sourceforge.yamlbeans.YamlException

    YamlReader yaml = new YamlReader(reader);
    prepareParser(yaml.getConfig());
    try {
      AppYaml appYaml = yaml.read(AppYaml.class);
      if (appYaml == null) {
        throw new YamlException("Unable to parse yaml file");
      }
      return appYaml.applyPlugins();
    } catch (YamlException e) {
      Throwable innerException = e.getCause();
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

                    case sequence:
                        return yamlConstructors.get(Tag.SEQ).construct(node);
                    case mapping:
                        return yamlConstructors.get(Tag.MAP).construct(node);
                    default:
                        throw new YAMLException("Unexpected node");
                    }
                }
            }
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

        private class ConstructSetFromSequence extends ConstructSequence {
            @Override
            public Object construct(Node node) {
                if (SortedSet.class.isAssignableFrom(node.getType())) {
                    if (node.isTwoStepsConstruction()) {
                        throw new YAMLException("Set cannot be recursive.");
                    } else {
                        Collection<Object> result = new TreeSet<Object>();
                        SetContructor.this.constructSequenceStep2((SequenceNode) node, result);
                        return result;
                    }
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

                    return node;
                }
            }
            // check array of primitives
            if (clazz.isArray()) {
                throw new YAMLException("Arrays of primitives are not fully supported.");
            }
            // check defaults
            if (multiRepresenters.containsKey(null)) {
                Represent representer = multiRepresenters.get(null);
                node = representer.representData(data);
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

                tag = Tag.BINARY;
                char[] binary;
                try {
                    binary = Base64Coder.encode(value.getBytes("UTF-8"));
                } catch (UnsupportedEncodingException e) {
                    throw new YAMLException(e);
                }
                value = String.valueOf(binary);
                style = '|';
            }
            // if no other scalar style is explicitly set, use literal style for
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

                    key.hashCode();// check circular dependencies
                }
                Object value = constructObject(valueNode);
                Object old = mapping.put(key, value);
                if (old != null) {
                    throw new YAMLException("The key is not unique " + key);
                }
            }
        }
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

            }
            Composer composer = new Composer(new CanonicalParser(buffer.toString()), resolver);
            constructor.setComposer(composer);
            return constructor.getSingleData(Object.class);
        } catch (IOException e) {
            throw new YAMLException(e);
        }
    }
View Full Code Here

Examples of org.yaml.snakeyaml.error.YAMLException

                    throw new UnsupportedOperationException();
                }
            };
            return new YamlIterable(result);
        } catch (IOException e) {
            throw new YAMLException(e);
        }
    }
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.