Convenience constructor for errors.