Set errorResultClass when initializing instead of the readwrite property