Class LuceneExceptions

java.lang.Object
com.apple.foundationdb.record.lucene.LuceneExceptions

public class LuceneExceptions extends Object
Utility class for converting Lucene Exceptions to/from Record layer ones.
  • Method Details

    • toRecordCoreException

      public static RuntimeException toRecordCoreException(String message, IOException ex, Object... additionalLogInfo)
      Convert the exception thrown by Lucene to a RecordCoreException that can be later interpreted by the higher levels.
      Parameters:
      message - the exception's message to use; the cause's message will be appended to this one
      ex - the exception thrown by Lucene
      additionalLogInfo - (optional) additional log infos to add to the created exception
      Returns:
      the RecordCoreException that should be thrown
    • toIoException

      public static IOException toIoException(Throwable ex, Throwable suppressed)
      Convert an exception thrown by the lower levels to one that can be thrown by Lucene (IOException).
      Parameters:
      ex - the exception thrown by FDB
      Returns:
      the IOException that can be thrown through Lucene APIs