fix #2560 remove sendError method
This commit is contained in:
parent
4852966aa6
commit
9c82b32e96
2 changed files with 2 additions and 14 deletions
|
@ -102,8 +102,8 @@ public class EsApiManager extends BaseApiManager {
|
|||
throw new WebApiException(HttpServletResponse.SC_FORBIDDEN, "Invalid session.");
|
||||
});
|
||||
} catch (final WebApiException e) {
|
||||
logger.debug("Web API access error. ", e);
|
||||
e.sendError(response);
|
||||
logger.warn("Web API access error.", e);
|
||||
response.sendError(e.getStatusCode(), "Web API access error.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
*/
|
||||
package org.codelibs.fess.exception;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class WebApiException extends FessSystemException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -42,12 +38,4 @@ public class WebApiException extends FessSystemException {
|
|||
public WebApiException(final int statusCode, final Exception e) {
|
||||
this(statusCode, e.getMessage(), e);
|
||||
}
|
||||
|
||||
public void sendError(final HttpServletResponse response) {
|
||||
try {
|
||||
response.sendError(statusCode, getMessage());
|
||||
} catch (final IOException e) {
|
||||
throw new FessSystemException("SC:" + statusCode + ": " + getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue