Title: How to detect error in "Set Directory"

How do I detect an error in a "Set Directory" statement?

It appears that 'set the directory to "My Dir"; answer the result' will return an empty string on success, an error message on failure.  This behavior makes sense.

But 'set the directory to myFunction(); answer the result' appears to return the result of myFunction on success, and an error message on failure.  I found this unacceptable because myFunction may return something that looks like an error.

I'm assuming that 'the result' was getting confused by the function call.  So I tried 'get myFunction(); set the directory to it; answer the result'.  This form returns the value of 'it' on success, an error message on failure.  So I have the same problem as with the function call.

How can I reliably determine if "Set Directory" worked or failed?

Reply via email to