Check if file is supported on app.load()
Hi,
Is there a way to check if the file is supported when loading it ?
I have the following example:
var importFile = new File(imgFolder + fileName);
try{
app.load(importFile);
}catch(e) {
return JSON.stringify({name: e.name, message: e.message});
}I'm returning the error to another application, but when the file is not supported (for example a broken or invalid format .PNG), then it will pass that try block and the script will continue to execute and is producing another error afterwards.
I'm getting the "cannot parse file" error described on this thread: Could not complete your request because the file-format module cannot parse the file
I need to get pass this error dialog and just return a custom message to another application.
PS. DialogModes.NO is already done.
Thanks in advance,
Jaan
Message was edited by: Jaan Koppe
