Simplest external AppleScript failing -1708

Running in Mavericks, when the external script I tried to use failed repeatedly I coded the simplest AppleScript possible:
With Debug option checked the logs read:
Checking the preview I see that the file still matches.
Adding to the top a call to the handler and running within Script Editor works fine:
Returning true from an embedded script works fine.
No doubt it's something simple I'm doing wrong, but … ?
- Code: Select all
on hazelMatchFile(theFile)
return true
end hazelMatchFile
With Debug option checked the logs read:
- Code: Select all
2013-11-09 16:55:37.606 hazelworker[7470] AppleScript error: {
OSAScriptErrorNumberKey = "-1708";
}
Checking the preview I see that the file still matches.
Adding to the top a call to the handler and running within Script Editor works fine:
- Code: Select all
hazelMatchFile("")
Returning true from an embedded script works fine.
No doubt it's something simple I'm doing wrong, but … ?