summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/anytun-showtables.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/anytun-showtables.cpp b/src/anytun-showtables.cpp
index 0ba8bdb..5d061d6 100644
--- a/src/anytun-showtables.cpp
+++ b/src/anytun-showtables.cpp
@@ -104,6 +104,8 @@ void readAndProcessOne()
message_lenght_stream >> message_lenght;
std::stringstream void_stream;
readExactly(1,void_stream); //skip space
+ if (!message_lenght)
+ return;
std::stringstream sync_command_stream;
readExactly(message_lenght, sync_command_stream);
//std::cout << message_lenght << std::endl;
@@ -119,7 +121,14 @@ int main(int argc, char* argv[])
while( std::cin.good() )
{
- readAndProcessOne();
+ try
+ {
+ readAndProcessOne();
+ }
+ catch(std::exception& e)
+ {
+ std::cout << "uncaught exception, exiting: " << e.what() << std::endl;
+ }
output();
}
return ret;