Java Code Examples for java.util.NoSuchElementException#printStackTrace()

The following examples show how to use java.util.NoSuchElementException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GoogleVisionImporter.java    From cineast with MIT License 5 votes vote down vote up
/**
 * @return Pair mapping a segmentID to a List of Descriptions
 */
@Override
public GoogleVisionTuple readNext() {
  try {
    Optional<GoogleVisionTuple> node = nextTuple();
    if (!node.isPresent()) {
      return null;
    }
    return node.get();
  } catch (NoSuchElementException e) {
    e.printStackTrace();
    return null;
  }
}
 
Example 2
Source File: CloneReporter.java    From SourcererCC with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void run() {
    try {
        this.reportClone(this.cp);
    } catch (NoSuchElementException e) {
        e.printStackTrace();
    }
}
 
Example 3
Source File: HandlerPoster.java    From Genius-Android with Apache License 2.0 5 votes vote down vote up
/**
 * poll a Runnable form {@link #mPool}
 *
 * @return Runnable
 */
private Runnable poll() {
    synchronized (mPool) {
        try {
            return mPool.poll();
        } catch (NoSuchElementException e) {
            e.printStackTrace();
            return null;
        }
    }
}