fix #2693 replace with InterruptedRuntimeException
This commit is contained in:
parent
3c61567cba
commit
84355e91cb
2 changed files with 6 additions and 2 deletions
|
@ -29,6 +29,7 @@ import java.util.List;
|
|||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.codelibs.core.exception.InterruptedRuntimeException;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.core.lang.ThreadUtil;
|
||||
import org.codelibs.fess.crawler.Constants;
|
||||
|
@ -147,7 +148,7 @@ public class CommandChain implements AuthenticationChain {
|
|||
if (mt != null && mt.isTeminated()) {
|
||||
throw new CommandExecutionException("The command execution is timeout: " + String.join(" ", commands), e);
|
||||
}
|
||||
throw new CommandExecutionException("Process terminated.", e);
|
||||
throw new InterruptedRuntimeException(e);
|
||||
} catch (final Exception e) {
|
||||
throw new CommandExecutionException("Process terminated.", e);
|
||||
} finally {
|
||||
|
|
|
@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.codelibs.core.exception.InterruptedRuntimeException;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.entity.QueryContext;
|
||||
|
@ -351,7 +352,9 @@ public class SearchHelper {
|
|||
throw new SearchEngineClientException(response.buildFailureMessage());
|
||||
}
|
||||
return true;
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
} catch (final InterruptedException e) {
|
||||
throw new InterruptedRuntimeException(e);
|
||||
} catch (final ExecutionException e) {
|
||||
throw new SearchEngineClientException("Failed to update bulk data.", e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue