core: improve message for assertion errors (throw assertion)
test: updated for the new assertion errors