if (log.isDebugEnabled()) log.debug("Failed to fetch file block [path=" + path + ", fileInfo=" + fileInfo + ", blockIdx=" + blockIdx + ", errMsg=" + e.getMessage() + ']'); throw new IOException(e.getMessage(), e);
throw new GridGgfsCorruptedFileException("Failed to retrieve file's data block (corrupted file?) " + "[path=" + path + ", blockIdx=" + blockIdx + ']');
throw new GridGgfsCorruptedFileException("Failed to retrieve file's data block (corrupted file?) " + "[path=" + path + ", blockIdx=" + blockIdx + ']');
/** * @param errCode Error code. * @param err Error. * @throws GridException Based on error code. */ public static void throwError(Integer errCode, String err) throws GridException { assert err != null; assert errCode != -1; if (errCode == ERR_FILE_NOT_FOUND) throw new GridGgfsFileNotFoundException(err); else if (errCode == ERR_PATH_ALREADY_EXISTS) throw new GridGgfsPathAlreadyExistsException(err); else if (errCode == ERR_DIRECTORY_NOT_EMPTY) throw new GridGgfsDirectoryNotEmptyException(err); else if (errCode == ERR_PARENT_NOT_DIRECTORY) throw new GridGgfsParentNotDirectoryException(err); else if (errCode == ERR_INVALID_HDFS_VERSION) throw new GridGgfsInvalidHdfsVersionException(err); else if (errCode == ERR_CORRUPTED_FILE) throw new GridGgfsCorruptedFileException(err); else if (errCode == ERR_GGFS_GENERIC) throw new GridGgfsException(err); throw new GridException(err); }
if (log.isDebugEnabled()) log.debug("Failed to fetch file block [path=" + path + ", fileInfo=" + fileInfo + ", blockIdx=" + blockIdx + ", errMsg=" + e.getMessage() + ']'); throw new IOException(e.getMessage(), e);
/** * @param errCode Error code. * @param err Error. * @throws GridException Based on error code. */ public static void throwError(Integer errCode, String err) throws GridException { assert err != null; assert errCode != -1; if (errCode == ERR_FILE_NOT_FOUND) throw new GridGgfsFileNotFoundException(err); else if (errCode == ERR_PATH_ALREADY_EXISTS) throw new GridGgfsPathAlreadyExistsException(err); else if (errCode == ERR_DIRECTORY_NOT_EMPTY) throw new GridGgfsDirectoryNotEmptyException(err); else if (errCode == ERR_PARENT_NOT_DIRECTORY) throw new GridGgfsParentNotDirectoryException(err); else if (errCode == ERR_INVALID_HDFS_VERSION) throw new GridGgfsInvalidHdfsVersionException(err); else if (errCode == ERR_CORRUPTED_FILE) throw new GridGgfsCorruptedFileException(err); else if (errCode == ERR_GGFS_GENERIC) throw new GridGgfsException(err); throw new GridException(err); }