Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 00645fef authored by Guillaume Thomazon's avatar Guillaume Thomazon
Browse files

PROXY-120 - Avoid Print Stack Trace

git-svn-id: https://scm.gforge.inria.fr/authscm/ycadoret/svn/gazelle/Maven/gazelle-proxy/trunk@46707 356b4b1a-1d2b-0410-8bf1-ffa24008f01e
parent ea27c25f
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,13 @@ import org.dcm4che2.data.VR;
import org.dcm4che2.io.DicomInputHandler;
import org.dcm4che2.io.DicomInputStream;
import org.dcm4che2.util.TagUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TxtInputHandler implements DicomInputHandler {
private static Logger log = LoggerFactory.getLogger(TxtInputHandler.class);
private static final int DEF_MAX_WIDTH = 78;
private static final int DEF_MAX_VAL_LEN = 64;
......@@ -159,7 +163,7 @@ public class TxtInputHandler implements DicomInputHandler {
writer.write(line.toString());
writer.newLine();
} catch (IOException e) {
e.printStackTrace();
log.error(""+e);
}
}
......
......@@ -666,8 +666,7 @@ public class MessagesBean implements Serializable {
try {
setHttpMessageType(URLEncoder.encode(getHttpMessageType(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
log.error("Failed to encode URL !");
e.printStackTrace();
log.error("Failed to encode URL ! : "+e);
}
builder.append(this.getHttpMessageType());
......
......@@ -174,7 +174,7 @@ public class DicomMessage extends AbstractMessage implements
bw.append("</span><br />");
}
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
......@@ -203,7 +203,7 @@ public class DicomMessage extends AbstractMessage implements
bw.append("</span><br />");
}
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
......@@ -231,7 +231,7 @@ public class DicomMessage extends AbstractMessage implements
bw.append("</span><br />");
}
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
if (!compact) {
......@@ -244,9 +244,9 @@ public class DicomMessage extends AbstractMessage implements
return sw.toString();
} catch (IOException e) {
e.printStackTrace();
log.error(""+e);
} catch (DicomException e) {
e.printStackTrace();
log.error(""+e);
}
}
return "";
......@@ -281,7 +281,7 @@ public class DicomMessage extends AbstractMessage implements
infoAffectedSOPClassUID = affectedSopClassUID;
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
// Command field
......@@ -296,7 +296,7 @@ public class DicomMessage extends AbstractMessage implements
infoCommandField = commandFieldTmp;
}
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
// requested sop class
......@@ -313,14 +313,14 @@ public class DicomMessage extends AbstractMessage implements
}
infoRequestedSOPClassUID = requestedSopClassUID;
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
}
} catch (IOException e) {
e.printStackTrace();
log.error(""+e);
} catch (DicomException e) {
e.printStackTrace();
log.error(""+e);
}
}
}
......@@ -430,7 +430,6 @@ public class DicomMessage extends AbstractMessage implements
}
} catch (IOException e) {
log.error("Failed to dump file : " + e);
e.printStackTrace();
}
return null;
}
......
......@@ -46,13 +46,10 @@ public class RawMessage extends AbstractMessage {
return stream.toString();
} catch (ArrayIndexOutOfBoundsException e) {
log.error("" + e);
e.printStackTrace();
} catch (IllegalArgumentException e) {
log.error("" + e);
e.printStackTrace();
} catch (IOException e) {
log.error("" + e);
e.printStackTrace();
}
return null;
......
......@@ -4,10 +4,15 @@ import java.io.InterruptedIOException;
import java.net.ServerSocket;
import java.net.Socket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ca.uhn.hl7v2.llp.MinLLPReader;
public class AppHL7Server {
private static Logger log = LoggerFactory.getLogger(AppHL7Server.class);
public static void main(String args[]) {
try {
ServerSocket ss = new ServerSocket(10014);
......@@ -22,10 +27,10 @@ public class AppHL7Server {
System.out.println(str);
} while (str != null);
} catch (InterruptedIOException ie) {
ie.printStackTrace();
} catch (InterruptedIOException e) {
log.error(""+e);
} catch (Exception e) {
e.printStackTrace();
log.error(""+e);
}
}
} catch (Exception e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment