Skip to content

Commit b990040

Browse files
author
sebastien.bouvard
committed
QPR-13745 Fix Whole portfolio failure
1 parent c9f0c28 commit b990040

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

OREAnalytics/orea/engine/creditindexdecomposition.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include <orea/engine/creditindexdecomposition.hpp>
20+
#include <orea/app/structuredanalyticserror.hpp>
2021
#include <ored/portfolio/cdo.hpp>
2122
#include <ored/portfolio/indexcreditdefaultswap.hpp>
2223
#include <ored/portfolio/indexcreditdefaultswapoption.hpp>
@@ -112,7 +113,9 @@ void decomposeCreditIndex(const QuantLib::ext::shared_ptr<ore::data::Trade>& tra
112113
decompose = true;
113114
}
114115
} catch (const std::exception& e) {
115-
QL_FAIL("Can not decompose credit risk in CRIF for trade id '" << trade->id() << "': " << e.what());
116+
string msg = "Can not decompose credit risk in CRIF: " + std::string(e.what());
117+
auto subFields = map<string, string>({{"tradeId", trade->id()}});
118+
StructuredAnalyticsErrorMessage("CRIF Generation", "", msg, subFields).log();
116119
sensitivityDecompositionWeights.clear();
117120
}
118121
}

0 commit comments

Comments
 (0)