Mercurial > hg > orthanc
comparison Core/HttpServer/MongooseServer.cpp @ 333:c730f6e42848
robustify
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jan 2013 15:40:10 +0100 |
parents | 4564e908bba9 |
children | 3a3b3ba8c1e0 |
comparison
equal
deleted
inserted
replaced
332:c51c9ed603e6 | 333:c730f6e42848 |
---|---|
552 output.SendHeader(Orthanc_HttpStatus_500_InternalServerError); | 552 output.SendHeader(Orthanc_HttpStatus_500_InternalServerError); |
553 } | 553 } |
554 catch (boost::bad_lexical_cast&) | 554 catch (boost::bad_lexical_cast&) |
555 { | 555 { |
556 LOG(ERROR) << "MongooseServer Exception: Bad lexical cast"; | 556 LOG(ERROR) << "MongooseServer Exception: Bad lexical cast"; |
557 output.SendHeader(Orthanc_HttpStatus_500_InternalServerError); | 557 output.SendHeader(Orthanc_HttpStatus_400_BadRequest); |
558 } | |
559 catch (std::runtime_error&) | |
560 { | |
561 LOG(ERROR) << "MongooseServer Exception: Presumably a bad JSON request"; | |
562 output.SendHeader(Orthanc_HttpStatus_400_BadRequest); | |
558 } | 563 } |
559 } | 564 } |
560 else | 565 else |
561 { | 566 { |
562 output.SendHeader(Orthanc_HttpStatus_404_NotFound); | 567 output.SendHeader(Orthanc_HttpStatus_404_NotFound); |