Skip to content

Commit

Permalink
[clib] Fix exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Mar 6, 2023
1 parent 07e9210 commit 7935229
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/clib/ct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ extern "C" {
auto soln = SolutionCabinet::at(n);
return ThermoCabinet::index(*soln->thermo());
} catch (...) {
return handleAllExceptions(npos, npos);
return handleAllExceptions(-2, ERR);
}
}

Expand All @@ -172,7 +172,7 @@ extern "C" {
}
return KineticsCabinet::index(*(soln->kinetics()));
} catch (...) {
return handleAllExceptions(npos, npos);
return handleAllExceptions(-2, ERR);
}
}

Expand All @@ -185,7 +185,7 @@ extern "C" {
}
return TransportCabinet::index(*(soln->transport()));
} catch (...) {
return handleAllExceptions(npos, npos);
return handleAllExceptions(-2, ERR);
}
}

Expand All @@ -207,7 +207,7 @@ extern "C" {
}
return SolutionCabinet::index(*(soln->adjacent(a)));
} catch (...) {
return handleAllExceptions(npos, npos);
return handleAllExceptions(-2, ERR);
}
}

Expand Down

0 comments on commit 7935229

Please sign in to comment.