added onError support to sutherlands relaxation algorithm