Throw new Error instead of string