IF (MapiHandler.ErrorStatus <> 0) then begin ERROR(FORMAT(MapiHandler.ErrorStatus)+': ' + MapiHandler.ErrorDescription); END;