diff options
author | emkael <emkael@tlen.pl> | 2016-05-23 22:30:24 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-05-23 22:30:24 +0200 |
commit | 666393fc1619daabdba4a187493479e2c1f82c2a (patch) | |
tree | f5c409f1bfbf193ec78bdbdc20a4ab910367755d /DDTable.cs | |
parent | 90ccfb4a70beac9deeb4501914fd90e9c6a6cb05 (diff) |
* BCalc error checks
Diffstat (limited to 'DDTable.cs')
-rw-r--r-- | DDTable.cs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -62,8 +62,14 @@ namespace BCDD {
BCalcWrapper.bcalcDDS_setPlayerOnLeadAndReset(solver, BCalcWrapper.bcalc_declarerToLeader(player));
result[player, denom] = 13 - BCalcWrapper.bcalcDDS_getTricksToTake(solver);
+ String error = Marshal.PtrToStringAuto(BCalcWrapper.bcalcDDS_getLastError(solver));
+ if (error != null)
+ {
+ throw new DDTableInvalidException("BCalc error: " + error);
+ }
}
}
+ BCalcWrapper.bcalcDDS_delete(solver);
return this.validateTable(result);
}
|