DEFINE CLASS ClassBase as Session DIMENSION aErrorInfo[1] && Array of error info bErrorOccurred = .F. && Set to True when an error occurs ** This method will be protected in subclasses PROCEDURE _HandleError() WITH This ** Save the error info to the error array property =AERROR(.aErrorInfo) ** Turn on the error flag .bErrorOccurred = .T. ENDWITH ENDPROC ** This method will be protected in subclasses PROCEDURE _ResetErrState() WITH This ** Reset the error array DIMENSION .aErrorInfo[1] .aErrorInfo = "" ** Turn off the error flag .bErrorOccurred = .F. ENDWITH ENDPROC ENDDEFINE *** Base class. All PEM's will be hidden in child classes DEFINE CLASS Child AS ClassBase ** Use the scope resolution operator to call base class ** methods that were protected in this class PROTECTED PROCEDURE _HandleError() ** ClassBase::_HandleError() DODEFAULT() ENDPROC PROTECTED PROCEDURE _ResetErrState() ClassBase::_ResetErrState() ENDPROC PROCEDURE MyProc() AS Boolean This._ResetErrState() This._HandleError() ENDPROC ENDDEFINE