Constructor, hasError and getReturnValue;

added a constructor to take data object and set it to be the
returnValue. HasError wil return true if the value of the error variable
is anything different than NO_ERROR.