Mercurial > hg > orthanc
diff Core/HttpServer/HttpServer.cpp @ 3672:ea8c1c0e81eb
Fix issue #65 (Logging improvements)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Feb 2020 17:22:28 +0100 |
parents | 94f4a18a79cc |
children | 2a170a8f1faf |
line wrap: on
line diff
--- a/Core/HttpServer/HttpServer.cpp Fri Feb 14 14:56:06 2020 +0100 +++ b/Core/HttpServer/HttpServer.cpp Fri Feb 14 17:22:28 2020 +0100 @@ -61,6 +61,7 @@ #include <string.h> #include <boost/lexical_cast.hpp> #include <boost/algorithm/string.hpp> +#include <boost/filesystem.hpp> #include <iostream> #include <string.h> #include <stdio.h> @@ -968,10 +969,15 @@ throw OrthancException(ErrorCode_BadParameterType, "Syntax error in some user-supplied data"); } + catch (boost::filesystem::filesystem_error& e) + { + throw OrthancException(ErrorCode_InternalError, + "Error while accessing the filesystem: " + e.path1().string()); + } catch (std::runtime_error&) { - // Presumably an error while parsing the JSON body - throw OrthancException(ErrorCode_BadRequest); + throw OrthancException(ErrorCode_BadRequest, + "Presumably an error while parsing the JSON body"); } catch (std::bad_alloc&) {