feature: inspect errors by `throw new Error()` and add ignoreInvalid key (false by default).