@@ -55,8 +55,7 @@ void ConfigPackagesHandler::HandleGet(const HttpApiRequest& request, HttpApiResp
5555 try {
5656 packages = ConfigPackageUtility::GetPackages ();
5757 } catch (const std::exception& ex) {
58- HttpUtility::SendJsonError (response, params, 500 , " Could not retrieve packages." ,
59- DiagnosticInformation (ex));
58+ HttpUtility::SendJsonError (response, params, 500 , " Could not retrieve packages." , std::current_exception ());
6059 return ;
6160 }
6261
@@ -121,8 +120,7 @@ void ConfigPackagesHandler::HandlePost(const HttpApiRequest& request, HttpApiRes
121120
122121 ConfigPackageUtility::CreatePackage (packageName);
123122 } catch (const std::exception& ex) {
124- HttpUtility::SendJsonError (response, params, 500 , " Could not create package '" + packageName + " '." ,
125- DiagnosticInformation (ex));
123+ HttpUtility::SendJsonError (response, params, 500 , " Could not create package '" + packageName + " '." , std::current_exception ());
126124 return ;
127125 }
128126
@@ -169,8 +167,7 @@ void ConfigPackagesHandler::HandleDelete(const HttpApiRequest& request, HttpApiR
169167 try {
170168 ConfigPackageUtility::DeletePackage (packageName);
171169 } catch (const std::exception& ex) {
172- HttpUtility::SendJsonError (response, params, 500 , " Failed to delete package '" + packageName + " '." ,
173- DiagnosticInformation (ex));
170+ HttpUtility::SendJsonError (response, params, 500 , " Failed to delete package '" + packageName + " '." , std::current_exception ());
174171 return ;
175172 }
176173
0 commit comments