Skip to content

Commit 8d402ae

Browse files
committed
Add error messages
1 parent e48ceac commit 8d402ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/httpserver/ResponseWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void write(Response response) {
3232
writeEmptyLine();
3333
writePayload(response);
3434
} catch (IOException e) {
35-
e.printStackTrace();
35+
System.out.println("Error while writing to output stream.");
3636
}
3737
}
3838

src/main/java/httpserver/SocketHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void run() {
4040
try {
4141
inputStream.close();
4242
} catch (IOException e) {
43-
e.printStackTrace();
43+
System.out.println("The inputStream could not be closed.");
4444
}
4545
}
4646
}

0 commit comments

Comments
 (0)