posted 9 years ago
Which OS are you targeting? Anything Unix-like will have the "which" command that tells you whether some executable is in the PATH or not. And if it's not on the PATH, it might as well not exist on the machine (unless you happen to have very specific knowledge of the machine in question, and it doesn't sound like you would). That approach seems safer than relying on specific exception behavior.