Select to view content in your preferred language

IGeoProcessorResult raise exception

1055
0
03-03-2011 12:43 PM
JoseSanchez
Frequent Contributor
Hi all

whenever the IGeoProcessorResult  does not execute correctly  would like to stop my program, to raise  an exception.


This code only shows error messages, bot does not stop the program:

 Execute the server tool
    Dim result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult
    result = CType(GP.Execute("CalculateBestPath", parameters, Nothing), ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult)
    
    If result.Status = esriJobStatus.esriJobSucceeded
        
        For Count As Integer = 0 To result.MessageCount - 1
            
            Console.WriteLine(result.GetMessage(Count))
            
        Next Count
        
    End If
0 Kudos
0 Replies