errors.add: use assert module instead of raw throws