Package java.util

Examples of java.util.NoSuchElementException.initCause()


        }
        try {
            return writer.next();
        } catch (IOException io) {
            NoSuchElementException problem = new NoSuchElementException( "Could not obtain the next feature:"+io );
            problem.initCause( io );
            throw problem;
        }      
    }
    public void remove() {
        try {
View Full Code Here


        try {
            return reader.next();
        } catch (IOException io) {
            close();
            NoSuchElementException problem = new NoSuchElementException( "Could not obtain the next feature:"+io );
            problem.initCause( io );
            throw problem;
        } catch (IllegalAttributeException create) {
            close();
            NoSuchElementException problem = new NoSuchElementException( "Could not create the next feature:"+create );
            problem.initCause( create );
View Full Code Here

            problem.initCause( io );
            throw problem;
        } catch (IllegalAttributeException create) {
            close();
            NoSuchElementException problem = new NoSuchElementException( "Could not create the next feature:"+create );
            problem.initCause( create );
            throw problem;
        }       
    }
    /** If this is a problem, a different iterator can be made based on FeatureWriter */
    public void remove() {
View Full Code Here

        Check.isMoreSpecific(result.getLocale(), locale, true);
      }
      return result;
    } catch (Exception ex){
      NoSuchElementException exception = new NoSuchElementException("Resource not found for basename '" + basename + "' and locale " + locale);
      exception.initCause(ex);
      throw exception;
    }
   
  }
View Full Code Here

                try {
                    previousNode = currentNode;
                    currentNode = targetList.loadNode(tx, currentNode.getNext());
                } catch (IOException unexpected) {
                    NoSuchElementException e = new NoSuchElementException(unexpected.getLocalizedMessage());
                    e.initCause(unexpected);
                    throw e;
                }
                result = currentNode.entries.getHead();
            }
            return result;
View Full Code Here

            ByteSequence bs = null;
            try {
                bs = store.getPayload(entry.getValue());
            } catch (IOException unexpected) {
                NoSuchElementException e = new NoSuchElementException(unexpected.getLocalizedMessage());
                e.initCause(unexpected);
                throw e;
            }
            return new PListEntry(entry.getKey(), bs, new Locator(entry.getKey()));
        }
View Full Code Here

                    String msg = "Failed to create descriptor for '"
                            + childDecl.getTargetNamespace() + "#" + childDecl.getName()
                            + " from container '" + typeDefinition.getTargetNamespace() + "#"
                            + typeDefinition.getName() + "'";
                    NoSuchElementException nse = new NoSuchElementException(msg);
                    nse.initCause(e);
                    throw nse;
                }
                schema.add(descriptor);
            }
           
View Full Code Here

            // (after that you are just silly)
            //
            throw new NoSuchElementException();           
        }
        NoSuchElementException cantFind = new NoSuchElementException( "Could not aquire feature:" + origionalProblem );
        cantFind.initCause( origionalProblem );
        origionalProblem = null;
        throw cantFind;
    }

    public void remove() {
View Full Code Here

        }
        try {
            return writer.next();
        } catch (IOException io) {
            NoSuchElementException problem = new NoSuchElementException( "Could not obtain the next feature:"+io );
            problem.initCause( io );
            throw problem;
        }      
    }
    public void remove() {
        try {
View Full Code Here

                    }
                } catch (IllegalAccessException ex) {
                    final NoSuchElementException e = new NoSuchElementException(new StringBuffer(
                            "Can't create the encoder ").append(encoder.getClass().getName())
                            .toString());
                    e.initCause(ex);
                    throw e;
                } catch (InstantiationException ex) {
                    final NoSuchElementException e = new NoSuchElementException(new StringBuffer(
                            "Can't create the encoder ").append(encoder.getClass().getName())
                            .toString());
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.