Have the preview method also return the errors

This enables the caller to show the errors seperately if desired.