congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NoSuchElementException.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
java.util.NoSuchElementException

Best Java code snippets using java.util.NoSuchElementException.toString (Showing top 20 results out of 315)

origin: org.onehippo.cms7.hst.components/hst-core

public boolean getBoolean(String key) {
  try {
    return configuration.getBoolean(key);
  } catch (NoSuchElementException e) {
    log.info("Return 'false' for '{}' because of '{}'", key , e.toString());
    return false;
  }
}
origin: org.onehippo.cms7.hst.components/hst-core

public int getInt(String key) {
  try {
    return configuration.getInt(key);
  } catch (NoSuchElementException e) {
    log.info("Return '0' for '{}' because of '{}'", key , e.toString());
    return 0;
  }
}
origin: org.jmx4perl/j4p14

private static CompositeData getRow(int idx, Iterator it) {
  try {
    for (int i = 0; i < idx; i++) {
      it.next();
    }
  } catch (NoSuchElementException ex) {
     throw new IllegalArgumentException(
         "Index " + idx + " out of range. Ex: " + ex.toString());
  }
  return (CompositeData) it.next();
}
origin: org.jmx4perl/j4p

private static CompositeData getRow(int idx, Iterator it) {
  try {
    for (int i = 0; i < idx; i++) {
      it.next();
    }
  } catch (NoSuchElementException ex) {
     throw new IllegalArgumentException(
         "Index " + idx + " out of range. Ex: " + ex.toString(),ex);
  }
  return (CompositeData) it.next();
}
origin: org.wildfly.core/wildfly-controller

  @Override
  public String toString() {
    return super.toString() + " [ " + getFailureDescription() + " ]";
  }
}
origin: org.onehippo.cms7.hst.components/hst-core

public double getDouble(String key) {
  try {
    return configuration.getDouble(key);
  } catch (NoSuchElementException e) {
    log.info("Return '0D' for '{}' because of '{}'", key , e.toString());
    return 0D;
  }
}
origin: wildfly/wildfly-core

  @Override
  public String toString() {
    return super.toString() + " [ " + getFailureDescription() + " ]";
  }
}
origin: org.onehippo.cms7.hst.components/hst-core

public float getFloat(String key) {
  try {
    return configuration.getFloat(key);
  } catch (NoSuchElementException e) {
    log.info("Return '0F' for '{}' because of '{}'", key , e.toString());
    return 0F;
  }
}
origin: org.terracotta.modules/tim-tree-map-cache

/** Returns the root {@Link Fqn} of the this tree
 *
 * @return
 * @throws CacheException
 */
public Fqn getFqn() throws CacheException {
  Fqn fqn;
  try {
    fqn = cacheTree.firstKey();
  } catch (NoSuchElementException e) {
    throw new CacheException(e.toString());
  }
  return fqn;
}
origin: com.synaptix/processmanager-core

public SyncMsg(String src) throws MalformedSyncMsgException {
  try {
    if (src.startsWith("?"))
      type = T_REQ;
    else if (src.startsWith(">"))
      type = T_REG;
    else if (src.startsWith("<"))
      type = T_UREG;
    else if (src.startsWith("O"))
      type = T_OVERLOAD;
    else if (src.startsWith("U"))
      type = T_UNDERLOAD;
    else
      type = T_UNKNOWN;
    StringTokenizer st = new StringTokenizer(src.substring(1), "|",
        true);
    registryUID = st.nextToken();
    st.nextToken();
    serviceID = st.nextToken();
    st.nextToken();
    providerURI = st.nextToken();
  } catch (NoSuchElementException ex) {
    throw new MalformedSyncMsgException("message " + src
        + " mal formé : " + ex.toString());
  }
}
origin: com.synaptix/SynaptixProcessManagerCore

public SyncMsg(String src) throws MalformedSyncMsgException {
  try {
    if (src.startsWith("?")) {
      type = T_REQ;
    } else if (src.startsWith(">")) {
      type = T_REG;
    } else if (src.startsWith("<")) {
      type = T_UREG;
    } else if (src.startsWith("O")) {
      type = T_OVERLOAD;
    } else if (src.startsWith("U")) {
      type = T_UNDERLOAD;
    } else {
      type = T_UNKNOWN;
    }
    StringTokenizer st = new StringTokenizer(src.substring(1), "|", true);
    registryUID = st.nextToken();
    st.nextToken();
    serviceID = st.nextToken();
    st.nextToken();
    providerURI = st.nextToken();
  } catch (NoSuchElementException ex) {
    throw new MalformedSyncMsgException("message " + src + " mal formé : " + ex.toString());
  }
}
origin: com.cloudera.oryx/oryx-als-serving

@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws IOException {
 CharSequence pathInfo = request.getPathInfo();
 if (pathInfo == null) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, "No path");
  return;
 }
 Iterator<String> pathComponents = SLASH.split(pathInfo).iterator();
 String userID;
 String itemID;
 try {
  userID = pathComponents.next();
  itemID = pathComponents.next();
 } catch (NoSuchElementException nsee) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
  return;
 }
 OryxRecommender recommender = getRecommender();
 recommender.removePreference(userID, itemID);
}
origin: org.terracotta.modules/tim-tree-map-cache

/** Returns the root {@Link Fqn} of the this tree
 *
 * @return
 * @throws CacheException
 */
public Fqn getFqn() throws CacheException {
  Fqn fqn;
  try {
    fqn = cacheTree.firstKey();
  } catch (NoSuchElementException e) {
    throw new CacheException(e.toString());
  }
  touch(fqn);
  return fqn;
}
origin: org.libreoffice/jurt

  /**
   * Returns the next element of the enumeration.
   *
   * <p>If no further elements available a com.sun.star.container.NoSuchElementException
   * exception will be thrown.</p>
   *
   * @return  the next element.
   * @see     com.sun.star.container.XEnumeration
   */
  public Object nextElement()
      throws com.sun.star.container.NoSuchElementException,
          com.sun.star.lang.WrappedTargetException,
          com.sun.star.uno.RuntimeException
  {
    if (enumeration == null)
      throw new com.sun.star.container.NoSuchElementException();
    try {
      return enumeration.next();
    } catch (java.util.NoSuchElementException e) {
      throw new com.sun.star.container.NoSuchElementException(e, e.toString());
    }
  }
}
origin: com.cloudera.oryx/oryx-als-serving

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
 CharSequence pathInfo = request.getPathInfo();
 if (pathInfo == null) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, "No path");
  return;
 }
 Iterator<String> pathComponents = SLASH.split(pathInfo).iterator();
 String userID;
 try {
  userID = pathComponents.next();
 } catch (NoSuchElementException nsee) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
  return;
 }
 OryxRecommender recommender = getRecommender();
 try {
  output(request, response, recommender.getKnownItemsForUser(userID));
 } catch (NotReadyException nre) {
  response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, nre.toString());
 }
}
origin: myrrix/myrrix-recommender

@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws IOException {
 CharSequence pathInfo = request.getPathInfo();
 if (pathInfo == null) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, "No path");
  return;
 }
 Iterator<String> pathComponents = SLASH.split(pathInfo).iterator();
 long userID;
 long itemID;
 try {
  userID = Long.parseLong(pathComponents.next());
  itemID = Long.parseLong(pathComponents.next());
 } catch (NoSuchElementException nsee) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
  return;
 } catch (NumberFormatException nfe) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, nfe.toString());
  return;
 }
 MyrrixRecommender recommender = getRecommender();
 try {
  recommender.removePreference(userID, itemID);
 } catch (TasteException te) {
  response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, te.toString());
  getServletContext().log("Unexpected error in " + getClass().getSimpleName(), te);
 }
}
origin: com.cloudera.oryx/oryx-als-serving

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
 CharSequence pathInfo = request.getPathInfo();
 if (pathInfo == null) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, "No path");
  return;
 }
 Iterator<String> pathComponents = SLASH.split(pathInfo).iterator();
 String userID;
 List<String> itemIDsList;
 try {
  userID = pathComponents.next();
  itemIDsList = new ArrayList<>();
  while (pathComponents.hasNext()) {
   itemIDsList.add(pathComponents.next());
  }
 } catch (NoSuchElementException nsee) {
  response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
  return;
 }
 String[] itemIDs = itemIDsList.toArray(new String[itemIDsList.size()]);
 unescapeSlashHack(itemIDs);
 OryxRecommender recommender = getRecommender();
 try {
  float[] estimates = recommender.estimatePreferences(userID, itemIDs);
  output(request, response, estimates);
 } catch (NotReadyException nre) {
  response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, nre.toString());
 }
}
origin: com.cloudera.oryx/oryx-als-serving

 userID = pathComponents.next();
} catch (NoSuchElementException nsee) {
 response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
 return;
origin: com.cloudera.oryx/oryx-als-serving

 itemIDsAndValue = RecommendToAnonymousServlet.parseItemValuePairs(pathComponents);
} catch (NoSuchElementException nsee) {
 response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
 return;
origin: org.apache.brooklyn/brooklyn-locations-jclouds

  @Test(groups={"Live", "Live-sanity"})
  public void testJcloudsCreateWithHardwareIdShortFormWithNoRegion() throws Exception {
    replaceJcloudsLocation(GCE_PROVIDER);
    
    try {
      obtainMachine(ImmutableMap.of(JcloudsLocation.HARDWARE_ID, N1_STANDARD_1_HARDWARE_ID));
      Asserts.shouldHaveFailedPreviously();
    } catch (Exception e) {
      NoSuchElementException nsee = Exceptions.getFirstThrowableOfType(e, NoSuchElementException.class);
      if (nsee == null || !nsee.toString().contains("hardwareId("+N1_STANDARD_1_HARDWARE_ID+") not found")) {
        throw e;
      }
    }
  }
}
java.utilNoSuchElementExceptiontoString

Popular methods of NoSuchElementException

  • <init>
    Constructs a NoSuchElementException, saving a reference to the error message string s for later retr
  • getMessage
  • initCause
  • printStackTrace
  • getLocalizedMessage
  • getCause
  • getStackTrace
  • setStackTrace
  • addSuppressed

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now