Add an Application Event for "failedToOpen", similar to "beforeOpen" and "afterOpen"
It would be useful to be able to create an Event Listener that would fire when a document failed to open. It would be great if we could cancel the default behavior using the PreventDefault.
My use case is the following. We offer a script that adds a custom menu item to allow users to select, convert, and open files that aren't usually supported by InDesign. We want to be able to offer the same type of functionality if the user attempts to open one of our supported file types through the standard Open Dialog (File->Open).
We would set up an Event Listener for "failedToOpen," which would validate that the file is one we support. If so, we would PreventDefault and prompt the user, asking if they'd like the file converted. If we didn't support the file type, we would allow the default behavior.