/** * Convert the illegal state exception to a database exception. * * @param e the illegal state exception * @return the database exception */ DbException convertException(IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_TRANSACTION_LOCKED) { throw DbException.get(ErrorCode.CONCURRENT_UPDATE_1, e, getName()); } return store.convertIllegalStateException(e); }
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
/** * Convert the illegal state exception to the correct database * exception. * * @param e the illegal state exception * @return the database exception */ DbException convertIllegalStateException(IllegalStateException e) { int errorCode = DataUtils.getErrorCode(e.getMessage()); if (errorCode == DataUtils.ERROR_FILE_CORRUPT) { if (encrypted) { throw DbException.get( ErrorCode.FILE_ENCRYPTION_ERROR_1, e, fileName); } } else if (errorCode == DataUtils.ERROR_FILE_LOCKED) { throw DbException.get( ErrorCode.DATABASE_ALREADY_OPEN_1, e, fileName); } else if (errorCode == DataUtils.ERROR_READING_FAILED) { throw DbException.get( ErrorCode.IO_EXCEPTION_1, e, fileName); } throw DbException.get( ErrorCode.FILE_CORRUPTED_1, e, fileName); }
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) { cursor = map.cursor(currentKey);
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) { cursor = map.cursor(currentKey);
int errorCode = DataUtils.getErrorCode(e.getMessage()); if (errorCode == DataUtils.ERROR_WRITING_FAILED) {
/** * Convert the illegal state exception to a database exception. * * @param e the illegal state exception * @return the database exception */ DbException convertException(IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_TRANSACTION_LOCKED) { throw DbException.get(ErrorCode.CONCURRENT_UPDATE_1, e, getName()); } return store.convertIllegalStateException(e); }
/** * Convert the illegal state exception to a database exception. * * @param e the illegal state exception * @return the database exception */ DbException convertException(IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_TRANSACTION_LOCKED) { throw DbException.get(ErrorCode.CONCURRENT_UPDATE_1, e, getName()); } return store.convertIllegalStateException(e); }
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
/** * Convert the illegal state exception to the correct database * exception. * * @param e the illegal state exception * @return the database exception */ DbException convertIllegalStateException(IllegalStateException e) { int errorCode = DataUtils.getErrorCode(e.getMessage()); if (errorCode == DataUtils.ERROR_FILE_CORRUPT) { if (encrypted) { throw DbException.get( ErrorCode.FILE_ENCRYPTION_ERROR_1, e, fileName); } } else if (errorCode == DataUtils.ERROR_FILE_LOCKED) { throw DbException.get( ErrorCode.DATABASE_ALREADY_OPEN_1, e, fileName); } else if (errorCode == DataUtils.ERROR_READING_FAILED) { throw DbException.get( ErrorCode.IO_EXCEPTION_1, e, fileName); } throw DbException.get( ErrorCode.FILE_CORRUPTED_1, e, fileName); }
/** * Convert the illegal state exception to the correct database * exception. * * @param e the illegal state exception * @return the database exception */ DbException convertIllegalStateException(IllegalStateException e) { int errorCode = DataUtils.getErrorCode(e.getMessage()); if (errorCode == DataUtils.ERROR_FILE_CORRUPT) { if (encrypted) { throw DbException.get( ErrorCode.FILE_ENCRYPTION_ERROR_1, e, fileName); } } else if (errorCode == DataUtils.ERROR_FILE_LOCKED) { throw DbException.get( ErrorCode.DATABASE_ALREADY_OPEN_1, e, fileName); } else if (errorCode == DataUtils.ERROR_READING_FAILED) { throw DbException.get( ErrorCode.IO_EXCEPTION_1, e, fileName); } throw DbException.get( ErrorCode.FILE_CORRUPTED_1, e, fileName); }
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) { cursor = map.cursor(currentKey);
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) { cursor = map.cursor(currentKey);
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) { cursor = map.cursor(currentKey);
} catch (IllegalStateException e) { if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) { cursor = map.cursor(currentKey);
int errorCode = DataUtils.getErrorCode(e.getMessage()); if (errorCode == DataUtils.ERROR_WRITING_FAILED) {
int errorCode = DataUtils.getErrorCode(e.getMessage()); if (errorCode == DataUtils.ERROR_WRITING_FAILED) {