Throw an error instead of console.err