Class LuceneExceptions
java.lang.Object
com.apple.foundationdb.record.lucene.LuceneExceptions
Utility class for converting Lucene Exceptions to/from Record layer ones.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A Wrapper around the transaction-too-old exception that gets thrown through Lucene as an IOException. -
Method Summary
Modifier and TypeMethodDescriptionstatic IOException
toIoException
(Throwable ex, Throwable suppressed) Convert an exception thrown by the lower levels to one that can be thrown by Lucene (IOException
).static RuntimeException
toRecordCoreException
(String message, IOException ex, Object... additionalLogInfo) Convert the exception thrown by Lucene to aRecordCoreException
that can be later interpreted by the higher levels.
-
Method Details
-
toRecordCoreException
public static RuntimeException toRecordCoreException(String message, IOException ex, Object... additionalLogInfo) Convert the exception thrown by Lucene to aRecordCoreException
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 oneex
- the exception thrown by LuceneadditionalLogInfo
- (optional) additional log infos to add to the created exception- Returns:
- the
RecordCoreException
that should be thrown
-
toIoException
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
-