Throw when required is not met instead of process.exit().