Tabnine Logo
DbException.throwInternalError
Code IndexAdd Tabnine to your IDE (free)

How to use
throwInternalError
method
in
org.h2.message.DbException

Best Java code snippets using org.h2.message.DbException.throwInternalError (Showing top 20 results out of 315)

origin: com.h2database/h2

@Override
public int readLob(long lobId, byte[] hmac, long offset, byte[] buff,
    int off, int length) {
  throw DbException.throwInternalError();
}
origin: com.h2database/h2

public Rownum(Prepared prepared) {
  if (prepared == null) {
    throw DbException.throwInternalError();
  }
  this.prepared = prepared;
}
origin: com.h2database/h2

  @Override
  public boolean containsDistinct(Value[] values) {
    // We have to make sure that we do not allow lazy
    // evaluation when this call is needed:
    // WHERE x IN (SELECT ...).
    throw DbException.throwInternalError();
  }
}
origin: com.h2database/h2

private void removeFromLinkedList(CacheObject rec) {
  if (SysProperties.CHECK && rec == head) {
    DbException.throwInternalError("try to remove head");
  }
  rec.cachePrevious.cacheNext = rec.cacheNext;
  rec.cacheNext.cachePrevious = rec.cachePrevious;
  // TODO cache: mystery: why is this required? needs more memory if we
  // don't do this
  rec.cacheNext = null;
  rec.cachePrevious = null;
}
origin: com.h2database/h2

public ConditionAndOr(int andOrType, Expression left, Expression right) {
  this.andOrType = andOrType;
  this.left = left;
  this.right = right;
  if (SysProperties.CHECK && (left == null || right == null)) {
    DbException.throwInternalError(left + " " + right);
  }
}
origin: com.h2database/h2

  @Override
  public boolean containsDistinct(Value[] values) {
    // We should never do this on remote result.
    throw DbException.throwInternalError();
  }
}
origin: com.h2database/h2

/**
 * INTERNAL
 */
@Override
public int getMaxLengthInplaceLob() {
  throw DbException.throwInternalError();
}
origin: com.h2database/h2

private void check() {
  if (SysProperties.CHECK) {
    for (int i = 0; i < entryCount + 1; i++) {
      int child = childPageIds[i];
      if (child == 0) {
        DbException.throwInternalError();
      }
    }
  }
}
origin: com.h2database/h2

@Override
public int readLob(long lobId, byte[] hmac, long offset, byte[] buff,
    int off, int length) {
  throw DbException.throwInternalError();
}
origin: com.h2database/h2

private void check() {
  if (SysProperties.CHECK) {
    for (int i = 0; i < entryCount + 1; i++) {
      int child = childPageIds[i];
      if (child == 0) {
        DbException.throwInternalError();
      }
    }
  }
}
origin: com.h2database/h2

private static void assertNotHolds(Object lock) {
  if (Thread.holdsLock(lock)) {
    throw DbException.throwInternalError(lock.toString());
  }
}
origin: com.h2database/h2

@Override
public Cursor findFirstOrLast(Session session, boolean first) {
  if (!first) {
    throw DbException.throwInternalError(
        "Spatial Index can only be fetch in ascending order");
  }
  return find(session);
}
origin: com.h2database/h2

@Override
public void decrypt(byte[] bytes, int off, int len) {
  if (SysProperties.CHECK) {
    if (len % ALIGN != 0) {
      DbException.throwInternalError("unaligned len " + len);
    }
  }
  for (int i = off; i < off + len; i += 8) {
    decryptBlock(bytes, bytes, i);
  }
}
origin: com.h2database/h2

/**
 * Verify the meta table is locked.
 *
 * @param session the session
 */
public void verifyMetaLocked(Session session) {
  if (meta != null && !meta.isLockedExclusivelyBy(session)
      && lockMode != Constants.LOCK_MODE_OFF) {
    throw DbException.throwInternalError();
  }
}
origin: com.h2database/h2

@Override
public Cursor findFirstOrLast(Session session, boolean first) {
  if (closed) {
    throw DbException.throwInternalError(toString());
  }
  if (!first) {
    throw DbException.throwInternalError(
        "Spatial Index can only be fetch by ascending order");
  }
  return find(session);
}
origin: com.h2database/h2

@Override
public void setIndexOwner(Index index) {
  if (this.index == index) {
    indexOwner = true;
  } else if (this.refIndex == index) {
    refIndexOwner = true;
  } else {
    DbException.throwInternalError(index + " " + toString());
  }
}
origin: com.h2database/h2

@Override
public void remove(Session session, Row row) {
  if (closed) {
    throw DbException.throwInternalError();
  }
  if (!treeMap.remove(getKey(row), row.getKey())) {
    throw DbException.throwInternalError("row not found");
  }
}
origin: com.h2database/h2

private static String getFileName(DataHandler handler, int tableId,
    int objectId) {
  if (SysProperties.CHECK && tableId == 0 && objectId == 0) {
    DbException.throwInternalError("0 LOB");
  }
  String table = tableId < 0 ? ".temp" : ".t" + tableId;
  return getFileNamePrefix(handler.getDatabasePath(), objectId) +
      table + Constants.SUFFIX_LOB_FILE;
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  if (visitor.getType() == ExpressionVisitor.QUERY_COMPARABLE) {
    return true;
  }
  throw DbException.throwInternalError("" + visitor.getType());
}
origin: com.h2database/h2

@Override
public void add(Session session, Row row) {
  if (closed) {
    throw DbException.throwInternalError();
  }
  treeMap.add(getKey(row), row.getKey());
}
org.h2.messageDbExceptionthrowInternalError

Javadoc

Throw an internal error. This method seems to return an exception object, so that it can be used instead of 'return', but in fact it always throws the exception.

Popular methods of DbException

  • getUnsupportedException
    Gets a SQL exception meaning this feature is not supported.
  • convert
    Convert a throwable to an SQL exception using the default mapping. All errors except the following a
  • get
    Create a database exception for a specific error code.
  • <init>
  • addSQL
    Set the SQL statement of the given exception. This method may create a new object.
  • convertIOException
    Convert an IO exception to a database exception.
  • convertInvocation
    Convert an InvocationTarget exception to a database exception.
  • convertToIOException
    Convert an exception to an IO exception.
  • getCause
  • getErrorCode
    Get the error code.
  • getInvalidValueException
    Gets a SQL exception meaning this value is invalid.
  • getJdbcSQLException
    Gets the SQL exception object for a specific error code.
  • getInvalidValueException,
  • getJdbcSQLException,
  • getMessage,
  • getSQLException,
  • getSource,
  • getSyntaxError,
  • printStackTrace,
  • setSource,
  • toSQLException

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now