Codota Logo
DataUtils.getErrorCode
Code IndexAdd Codota to your IDE (free)

How to use
getErrorCode
method
in
org.h2.mvstore.DataUtils

Best Java code snippets using org.h2.mvstore.DataUtils.getErrorCode (Showing top 19 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: com.h2database/h2

/**
 * 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);
}
origin: com.h2database/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
origin: com.h2database/h2

/**
 * 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);
}
origin: com.h2database/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) ==
      DataUtils.ERROR_CHUNK_NOT_FOUND) {
    cursor = map.cursor(currentKey);
origin: com.h2database/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) ==
      DataUtils.ERROR_CHUNK_NOT_FOUND) {
    cursor = map.cursor(currentKey);
origin: com.h2database/h2

int errorCode = DataUtils.getErrorCode(e.getMessage());
if (errorCode == DataUtils.ERROR_WRITING_FAILED) {
origin: org.wowtools/h2

/**
 * 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);
}
origin: com.eventsourcing/h2

/**
 * 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);
}
origin: com.h2database/h2-mvstore

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
origin: org.wowtools/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
origin: com.eventsourcing/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
origin: com.eventsourcing/h2

/**
 * 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);
}
origin: org.wowtools/h2

/**
 * 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);
}
origin: com.eventsourcing/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) ==
      DataUtils.ERROR_CHUNK_NOT_FOUND) {
    cursor = map.cursor(currentKey);
origin: org.wowtools/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) ==
      DataUtils.ERROR_CHUNK_NOT_FOUND) {
    cursor = map.cursor(currentKey);
origin: com.eventsourcing/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) ==
      DataUtils.ERROR_CHUNK_NOT_FOUND) {
    cursor = map.cursor(currentKey);
origin: org.wowtools/h2

} catch (IllegalStateException e) {
  if (DataUtils.getErrorCode(e.getMessage()) ==
      DataUtils.ERROR_CHUNK_NOT_FOUND) {
    cursor = map.cursor(currentKey);
origin: com.eventsourcing/h2

int errorCode = DataUtils.getErrorCode(e.getMessage());
if (errorCode == DataUtils.ERROR_WRITING_FAILED) {
origin: org.wowtools/h2

int errorCode = DataUtils.getErrorCode(e.getMessage());
if (errorCode == DataUtils.ERROR_WRITING_FAILED) {
org.h2.mvstoreDataUtilsgetErrorCode

Javadoc

Get the error code from an exception message.

Popular methods of DataUtils

  • readVarInt
    Read a variable size int.
  • appendMap
    Append a map to the string builder, sorted by key.
  • checkArgument
    Throw an IllegalArgumentException if the argument is invalid.
  • copyExcept
    Copy the elements of an array, and remove one element.
  • copyWithGap
    Copy the elements of an array, with a gap.
  • encodeLength
    Convert the length to a length code 0..31. 31 means more than 1 MB.
  • formatMessage
    Format an error message.
  • getCheckValue
    Calculate a check value for the given integer. A check value is mean to verify the data is consisten
  • getFletcher32
    Calculate the Fletcher32 checksum.
  • getPageChunkId
    Get the chunk id from the position.
  • getPageMaxLength
    Get the maximum length for the given code. For the code 31, PAGE_LARGE is returned.
  • getPageOffset
    Get the offset from the position.
  • getPageMaxLength,
  • getPageOffset,
  • getPagePos,
  • getPageType,
  • getVarIntLen,
  • initCause,
  • newIllegalArgumentException,
  • newIllegalStateException,
  • newUnsupportedOperationException

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now