Skip to content

Commit

Permalink
Log warning for socket exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Oct 31, 2007
1 parent ae46fc3 commit 4f4d347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -22,6 +22,7 @@
package org.jumpmind.symmetric.web;

import java.io.IOException;
import java.net.SocketException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -75,6 +76,8 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws S
getDataExtractorService().extract(getNodeService().findNode(nodeId), out);
out.close();
}
} catch (SocketException ex) {
logger.warn("Socket error while procesing pull data for " + nodeId + ". " + ex.getMessage());
} catch (Exception ex) {
logger.error("Error while pulling data for " + nodeId, ex);
resp.sendError(501);
Expand Down
Expand Up @@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.SocketException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -52,6 +53,8 @@ protected void doPut(HttpServletRequest req, HttpServletResponse resp)
OutputStream out = createOutputStream(resp);
getDataLoaderService().loadData(is, out);
out.flush();
} catch (SocketException ex) {
logger.warn("Socket error while procesing pushed data for " + nodeId + ". " + ex.getMessage());
} catch (Exception ex) {
logger
.error("Error while processing pushed data for " + nodeId,
Expand Down

0 comments on commit 4f4d347

Please sign in to comment.