AnsweredAssumed Answered

Catch 'Object Not Found' Python Script Toolbox Error

Question asked by Yuriko.Hashimoto.dfo on Apr 6, 2020

I have a Python Script Toolbox that runs Updates Parameters based on an existing user-selected Folder Workspace parameter. I want to customize the error that occurs when a user selects a folder path that does not exist. The current error that displays is a generic 'Object Not Found' error "The object 'some non-existing file path' could not be found."

 

I want to update the error to read, "The 'some non-existing file path" could not be found. Please enter an existing project folder."

 

Please note that all of this occurs within the 'Update Parameters' function before the tool parameters have been validated.

 

Thanks so much in advance!

Outcomes