changeset 327:4564e908bba9

handling of bad lexical casts in http server
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Jan 2013 14:49:08 +0100
parents e7276309b269
children 25514c48e30e
files Core/HttpServer/MongooseServer.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.cpp	Tue Jan 08 10:02:21 2013 +0100
+++ b/Core/HttpServer/MongooseServer.cpp	Tue Jan 08 14:49:08 2013 +0100
@@ -551,6 +551,11 @@
           LOG(ERROR) << "MongooseServer Exception [" << e.What() << "]";
           output.SendHeader(Orthanc_HttpStatus_500_InternalServerError);        
         }
+        catch (boost::bad_lexical_cast&)
+        {
+          LOG(ERROR) << "MongooseServer Exception: Bad lexical cast";
+          output.SendHeader(Orthanc_HttpStatus_500_InternalServerError);        
+        }
       }
       else
       {