From 65d8c11450bbd12fb8109d4ca4782b2b3d68a79c Mon Sep 17 00:00:00 2001 From: Lukas Werling Date: Sat, 7 Jan 2017 17:22:28 +0100 Subject: [PATCH] netpuncher: Add runtime error handling Previously, the netpuncher would just exit silently when encountering an error. --- src/netpuncher/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/netpuncher/main.cpp b/src/netpuncher/main.cpp index ea6120b95..571492131 100644 --- a/src/netpuncher/main.cpp +++ b/src/netpuncher/main.cpp @@ -96,7 +96,11 @@ int main(int argc, char * argv[]) printf("Listening on port %d...\n", iPort); // Execute forever - Puncher.ExecuteUntil(-1); + for (;;) + { + Puncher.ExecuteUntil(-1); + fprintf(stderr, "ERROR: %s\n", Puncher.GetError()); + } return 0; }