179 - Added setError and clearError methods

I've added the setError and clearError methods suggested in issue 179