mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
19.50.2014 29d68e4102c4f38894207967d9c1a0bdadd91214
OPENDJ-1602 (CR-5566) New pluggable storage based backend

Generate a more helpful error message when storage errors occur.
1 files modified
16 ■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/BackendImpl.java 16 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/BackendImpl.java
@@ -938,8 +938,20 @@
   */
  DirectoryException createDirectoryException(StorageRuntimeException e)
  {
    if (true) { // FIXME JNR
      throw new NotImplementedException();
    if (true) // FIXME JNR
    {
      Throwable cause = e.getCause();
      if (cause instanceof OpenDsException)
      {
        return new DirectoryException(
            DirectoryServer.getServerErrorResultCode(), (OpenDsException) cause);
      }
      else
      {
        return new DirectoryException(
            DirectoryServer.getServerErrorResultCode(),
            LocalizableMessage.raw(e.getMessage()));
      }
    }
    if (/*e instanceof EnvironmentFailureException && */ !rootContainer.isValid()) {
      LocalizableMessage message = NOTE_BACKEND_ENVIRONMENT_UNUSABLE.get(getBackendID());