@@ -225,10 +225,12 @@ public async Task Listen() {
225
225
}
226
226
} catch ( HttpListenerException listenerException ) {
227
227
Console . Error . WriteLine ( "HttpListenerException during request handling: {0}" , listenerException . Message ) ;
228
+ Console . Error . WriteLine ( "Stack Trace:\n {0}\n " , listenerException . StackTrace ) ;
228
229
}
229
230
}
230
231
} catch ( Exception ex ) {
231
232
Console . Error . WriteLine ( "Unhandled exception during request handling: {0}" , ex . Message ) ;
233
+ Console . Error . WriteLine ( "Stack Trace:\n {0}\n " , ex . StackTrace ) ;
232
234
}
233
235
}
234
236
@@ -238,6 +240,7 @@ private void ServeFailure(HttpListenerContext context) {
238
240
context . Response . OutputStream . Close ( ) ;
239
241
} catch ( Exception exception ) {
240
242
Console . Error . WriteLine ( "Network Exception: {0}" , exception . Message ) ;
243
+ Console . Error . WriteLine ( "Stack Trace:\n {0}\n " , exception . StackTrace ) ;
241
244
}
242
245
}
243
246
@@ -255,6 +258,7 @@ private void ServeUncachedString(string responseString, HttpListenerContext cont
255
258
context . Response . OutputStream . Close ( ) ;
256
259
} catch ( Exception exception ) {
257
260
Console . Error . WriteLine ( "Network Exception: {0}" , exception . Message ) ;
261
+ Console . Error . WriteLine ( "Stack Trace:\n {0}\n " , exception . StackTrace ) ;
258
262
}
259
263
}
260
264
@@ -1238,6 +1242,7 @@ private string ReadRequestBody(HttpListenerContext context) {
1238
1242
return data ;
1239
1243
} catch ( Exception exception ) {
1240
1244
Console . Error . WriteLine ( "Network Exception: {0}" , exception . Message ) ;
1245
+ Console . Error . WriteLine ( "Stack Trace:\n {0}\n " , exception . StackTrace ) ;
1241
1246
return null ;
1242
1247
}
1243
1248
}
0 commit comments