Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Photoshop CC Update broke Try/Catch on ActionSets

$
0
0

Can anyone else, running the latest version of Photoshop CC, confirm that an error message is being popped up whenever you use a try/catch to attempt to run an action that doesn't exist?  Below is an example of my code:

    try {        var actionName = fr.getSubFeatureList.getPrimaryAction(feature); //Returns the first likely action name, a string variable such as "primary" which may or may not exist (in the case of the error, it does not)        app.doAction(actionName,"saving");    } catch(e) {        //This is showing the error that should be getting caught and suppressed.        //The rest of the statement works, but the error message is defeating the purpose of automation...        //Error message: "The object 'action 'primary' of set 'saving' is not currently available."        try {            var actionName = fr.getSubFeatureList.getSecondaryAction(feature); //Returns a secondary action name if the first fails, such as "secondary"            app.doAction(actionName,"saving");        } catch(e1) {            errLog.addError("The " + fr.getSubFeatureList.getPrimaryAction(feature) + " action could not be found.");            return;        }    }

Can anyone else confirm this issue?  It only appears to be happening when dealing with actions and it is happening on a statement that has been used, without issue, for several months up until the latest update.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>