本文整理了Java中java.util.NoSuchElementException.getCause()
方法的一些代码示例,展示了NoSuchElementException.getCause()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchElementException.getCause()
方法的具体详情如下:
包路径:java.util.NoSuchElementException
类名称:NoSuchElementException
方法名:getCause
暂无
代码示例来源:origin: apache/servicemix-bundles
public T getResource() {
try {
return internalPool.borrowObject();
} catch (NoSuchElementException nse) {
if (null == nse.getCause()) { // The exception was caused by an exhausted pool
throw new JedisExhaustedPoolException(
"Could not get a resource since the pool is exhausted", nse);
}
// Otherwise, the exception was caused by the implemented activateObject() or ValidateObject()
throw new JedisException("Could not get a resource from the pool", nse);
} catch (Exception e) {
throw new JedisConnectionException("Could not get a resource from the pool", e);
}
}
代码示例来源:origin: iterate-ch/cyberduck
throw new ConnectionCanceledException(e);
final Throwable cause = e.getCause();
if(null == cause) {
log.warn(String.format("Timeout borrowing session from pool %s. Wait for another %dms", this, BORROW_MAX_WAIT_INTERVAL));
代码示例来源:origin: Azure/azure-storage-android
assertEquals(e.getMessage(),
"An error occurred while enumerating the result, check the original exception for details.");
assertEquals(e.getCause().getMessage(), "Error parsing log record: unexpected end of stream.");
assertEquals(e.getMessage(),
"An error occurred while enumerating the result, check the original exception for details.");
assertEquals(e.getCause().getMessage(), "The specified blob does not exist.");
代码示例来源:origin: Azure/azure-storage-android
HttpURLConnection.HTTP_FORBIDDEN, ((StorageException) ex.getCause()).getHttpStatusCode());
HttpURLConnection.HTTP_FORBIDDEN, ((StorageException) ex.getCause()).getHttpStatusCode());
代码示例来源:origin: Azure/azure-storage-android
assertEquals(permissionsErrorCode, ((StorageException) ex.getCause()).getHttpStatusCode());
内容来源于网络,如有侵权,请联系作者删除!