diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-03 09:16:28 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-03 09:16:28 +0200 |
commit | 081155c438c0680b868175c95d160f1e3b519541 (patch) | |
tree | 89927a10ba33db11e9d21514b2fd3b76023e6dfd /src/solver.c | |
parent | 00958d92070c583e4fa9d01f5010bce12bcd1b40 (diff) | |
download | apk-tools-081155c438c0680b868175c95d160f1e3b519541.tar.gz apk-tools-081155c438c0680b868175c95d160f1e3b519541.tar.bz2 apk-tools-081155c438c0680b868175c95d160f1e3b519541.tar.xz apk-tools-081155c438c0680b868175c95d160f1e3b519541.zip |
solver: improve assert error messages
Print name of package and void double "ERROR"
Diffstat (limited to 'src/solver.c')
-rw-r--r-- | src/solver.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/solver.c b/src/solver.c index f9a2117..edf1650 100644 --- a/src/solver.c +++ b/src/solver.c @@ -927,11 +927,12 @@ static int next_branch(struct apk_solver_state *ss) #ifdef DEBUG_CHECKS ASSERT(cmpscore(&d->saved_score, &ss->score) == 0, - "ERROR! saved_score "SCORE_FMT" != score "SCORE_FMT, + "Saved_score "SCORE_FMT" != score "SCORE_FMT, SCORE_PRINTF(&d->saved_score), SCORE_PRINTF(&ss->score)); ASSERT(d->saved_requirers == name->ss.requirers, - "ERROR! requirers not restored between decisions"); + "Requirers not restored between decisions (%s)", + name->name); #endif if (backup_until >= ss->num_decisions && |