Select to view content in your preferred language

Catch 'Object Not Found' Python Script Toolbox Error

201
0
04-06-2020 01:51 PM
YurikoHashimoto1
New Contributor II

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!

0 Kudos
0 Replies