Intercepting & Updating Isolation Trace Warnings & Errors with Custom Messages

498
0
03-25-2021 05:48 AM
Labels (1)
AndrewTheGovtDrone
New Contributor

Hey Friends!

I am working with the Water Outage solution template from Esri to implement an Isolation Trace application. I've successfully built the geometric network and deployed the solution, but am having difficulty modifying the existing functionality of the underlying python toolbox for more user-friendly error logging. Specifically, I'm looking to change the verbiage of the 001191 Error to something a bit more intuitive for users.

The error occurs when a user drops a location that is too far from a main to snap to and the current message is "No flag found from the flag junction feature class" which, to a non-GIS user is not super helpful. I'm looking to alter the error message to something like "The point you dropped is not within feet of the main line. Try zooming in and placing the point or selecting a location closer to the service line."

Unfortunately, I've been unable to nail down where exactly this is being controlled. I've attempted several smoke-tests to input debug.logger messages in the various python files that this tool leverages but I can't seem to identify where that particular error is being returned from. I have even tried altering every occurrence of arcpy.AddMessage, arcpy.ExecuteError, arcpy.AddError, arcpy.AddReturnMessage and arcpy.GetMessage(s). 

I for the life of me cannot seem to find where this particular error, which "should" be generated during the Isolation Trace's snap method is actually being generated and triggering the error.

If anyone can point me in the right direction or has accomplished this functionality within an existing Esri solution template, I would be super appreciative! 

Cheers

Cheers,
A
0 Kudos
0 Replies