S
Simon L. Prinsloo
Guest
Update the following constructor: PUBLIC AppError ( INPUT ReturnValue AS CHARACTER ). When constructing an error, accidental omission of the MessageNumber parameter leads to the error message ending up in the ReturnValue property. At the very least, the constructor must also invoke AddMessage ( ReturnValue ,0), in addition to setting the ReturnValue property. This will simplify coding in modern CODE where ReturnValue should yield in favour of output parameters (to pass back values) and throwing/returning proper Error Objects instead of simply raising an error with RETURN ERROR, while preserving behaviour for applications relying on RETURN-VALUE. Impact on existing code should be low and personally I can live with existing code that goes through the trouble of appending the return value to the messages, which may result in duplication of the message in cases where overridden error objects populates both. More ideal would be to eliminate the duplication of data completely by changing ReturnValue to simply return GetMessage(1) , but this solution might be less compatible with legacy code. Once again, I am willing to take this risk on any of the vast, legacy code bases that I work on.
Continue reading...
Continue reading...