Skip to content

Commit

Permalink
better error hanndliing (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
SlejmUr committed Sep 20, 2023
1 parent 8da54b0 commit 050a80b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions PayCheckServerLib/Servers/PC3Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using PayCheckServerLib.Helpers;
using PayCheckServerLib.Responses;
using PayCheckServerLib.WSController;
using System.Diagnostics;
using System.Net.Sockets;
using System.Reflection;
using System.Security.Authentication;
Expand Down Expand Up @@ -257,7 +258,20 @@ protected override void OnReceivedRequestError(HttpRequest request, string error
protected override void OnError(SocketError error)
{
Debugger.PrintDebug($"HTTP session caught an error: {error}");
StackTrace st = new StackTrace(true);
for (int i = 0; i < st.FrameCount; i++)
{
var sf = st.GetFrame(i);
if (sf == null)
continue;
Debugger.PrintDebug("");
Debugger.PrintDebug($"Method: " + sf.GetMethod());
Debugger.PrintDebug($"File: " + sf.GetFileName());
Debugger.PrintDebug($"Line Number: " + sf.GetFileLineNumber());
Debugger.PrintDebug("");
}
}

}

public class PC3WSSServer : WssServer
Expand Down

0 comments on commit 050a80b

Please sign in to comment.