assert: improve ifError
- Commit:
It is hard to know where ifError
is actually triggered due to the
original error being thrown.
This changes it by wrapping the original error in a AssertionError.
This has the positive effect of also making clear that it is indeed
a assertion function that triggered that error.
The original stack can still be accessed by checking the actual
property.
- Commit:
Show only the Error class and not errors.AssertionError
.
- Commit:
Make ifError
stricter by only accepting null
and undefined
from now on.
Before any truthy value was accepted.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
assert