7 auto colon =
error.find(
':');
8 if (colon != std::string::npos) {
9 if (
error.substr(0, colon) ==
"EDMException") {
10 auto errorNameStart =
error.find(
'{');
11 auto errorNameEnd =
error.find(
'}');
12 if (errorNameStart != std::string::npos and errorNameEnd != std::string::npos) {
13 auto errorName =
error.substr(errorNameStart + 1, errorNameEnd - errorNameStart - 1);
14 if (
"Configuration" == errorName) {
15 auto newLine =
error.find(
'\n', errorNameEnd + 1);
16 if (newLine == std::string::npos) {
17 newLine = errorNameEnd + 1;
20 }
else if (
"UnavailableAccelerator" == errorName) {
21 auto newLine =
error.find(
'\n', errorNameEnd + 1);
22 if (newLine == std::string::npos) {
23 newLine = errorNameEnd + 1;
void pythonToCppException(const std::string &iType, const std::string &error)