Mercurial > hg > orthanc
diff Core/HttpServer/MongooseServer.cpp @ 2954:d924f9bb61cc
taking advantage of details in OrthancException
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Dec 2018 14:35:34 +0100 |
parents | 1153b1a128fe |
children | 4e43e67f8ecf |
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.cpp Mon Dec 03 11:49:39 2018 +0100 +++ b/Core/HttpServer/MongooseServer.cpp Mon Dec 03 14:35:34 2018 +0100 @@ -813,8 +813,8 @@ // Now convert native exceptions as OrthancException catch (boost::bad_lexical_cast&) { - LOG(ERROR) << "Syntax error in some user-supplied data"; - throw OrthancException(ErrorCode_BadParameterType); + throw OrthancException(ErrorCode_BadParameterType, + "Syntax error in some user-supplied data"); } catch (std::runtime_error&) { @@ -823,13 +823,13 @@ } catch (std::bad_alloc&) { - LOG(ERROR) << "The server hosting Orthanc is running out of memory"; - throw OrthancException(ErrorCode_NotEnoughMemory); + throw OrthancException(ErrorCode_NotEnoughMemory, + "The server hosting Orthanc is running out of memory"); } catch (...) { - LOG(ERROR) << "An unhandled exception was generated inside the HTTP server"; - throw OrthancException(ErrorCode_InternalError); + throw OrthancException(ErrorCode_InternalError, + "An unhandled exception was generated inside the HTTP server"); } } catch (OrthancException& e)