Posted on 1999-11-09
It happens a lot of times that we call a method for doing something and we want to know both if the method operation result was ok (and if so, to know the returned value) or not ok.
I thought of creating a Result Class that will contain int (represents the result: success/failure) and an error message that will contain the error message in case of error and last, an Object that contain the Object result in case it was ok.
Is it ok to do so?
is it clear to understand the Result class' purpose and data members?
Thank you very much.