..
Dim fieldChangeChecker As New FieldChangeChecker( "FirstName,LastName,Address,PostCode,City" )
Set customerDoc = customersView.getFirstDocument()
While Not customerDoc Is Nothing
Call fieldChangeChecker.readInitialValues( customerDoc )
'// Code that looks up the newest information and sets fields
If fieldChangeChecker.haveFieldsChanged( customerDoc ) Then
Call dataDoc.Save(True, False)
End If
Set customerDoc = customersView.getNextDocument( customerDoc )
Wend
..

Regarding the errorMessage-function in the class. I use error bubbling in all my LS code. If something fails somewhere in a routine, I want the routine to stop executing. At the top of the stack, I use OpenLog/LogError. This gives me a nice pseudo stack of the function calls.
Code for errorMessage function: