Mercurial > hg > orthanc
diff OrthancFramework/Sources/RestApi/RestApi.cpp @ 4421:a7d72378e1cb
cont openapi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Dec 2020 15:22:00 +0100 |
parents | a4518adede59 |
children | 83371ccdfe80 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/RestApi/RestApi.cpp Tue Dec 29 12:21:51 2020 +0100 +++ b/OrthancFramework/Sources/RestApi/RestApi.cpp Tue Dec 29 15:22:00 2020 +0100 @@ -195,11 +195,13 @@ ok = (resource.Handle(call) && HandleCall(call, uriArgumentsNames)); } - catch (OrthancException&) + catch (OrthancException& e) { + LOG(ERROR) << "Exception while documenting GET " << path << ": " << e.What(); } catch (boost::bad_lexical_cast&) { + LOG(ERROR) << "Bad lexical cast while documenting GET " << path; } if (ok) @@ -231,11 +233,13 @@ ok = (resource.Handle(call) && HandleCall(call, uriArgumentsNames)); } - catch (OrthancException&) + catch (OrthancException& e) { + LOG(ERROR) << "Exception while documenting POST " << path << ": " << e.What(); } catch (boost::bad_lexical_cast&) { + LOG(ERROR) << "Bad lexical cast while documenting POST " << path; } if (ok) @@ -266,11 +270,13 @@ ok = (resource.Handle(call) && HandleCall(call, uriArgumentsNames)); } - catch (OrthancException&) + catch (OrthancException& e) { + LOG(ERROR) << "Exception while documenting DELETE " << path << ": " << e.What(); } catch (boost::bad_lexical_cast&) { + LOG(ERROR) << "Bad lexical cast while documenting DELETE " << path; } if (ok) @@ -302,11 +308,13 @@ ok = (resource.Handle(call) && HandleCall(call, uriArgumentsNames)); } - catch (OrthancException&) + catch (OrthancException& e) { + LOG(ERROR) << "Exception while documenting PUT " << path << ": " << e.What(); } catch (boost::bad_lexical_cast&) { + LOG(ERROR) << "Bad lexical cast while documenting PUT " << path; } if (ok)