Page 1 of 1

Try / Catch bug ?

Posted: November 20th, 2009, 7:13 am
by Yenaphe
Hi everyone,

I have a try/catch looking like that:

Code: Select all

			
try{ 
	Property.selected = true; 
}catch(err1){ 
	Result = false; 
} 
Every time I execute my script (by pressing a button on my script UI), the first time it goes into this try/catch, the script fails and open the Extend Script saying that Property.selected cannot be true because property is hidden. And that's exactly why I do this try/catch. But after this initial fail, it won't ever fail again. If I close my script and reopen it, i'll get once again the fail on the first try, and then it will go smoothly.

It there something i'm missing yet ?

Re: Try / Catch bug ?

Posted: November 23rd, 2009, 3:39 pm
by lloydalvarez
Hey Seb,

Is there a reason you cant do an if else conditional intead of a try catch?

-Lloyd

Re: Try / Catch bug ?

Posted: November 30th, 2009, 6:24 am
by Yenaphe
I made a if/else statement at first, but I was getting the same error when testing if it was possible to set the param to true.

Re: Try / Catch bug ?

Posted: December 19th, 2009, 4:50 am
by Paul Tuersley
Yeah this try/catch bug is a real pain. I run into it all the time when writing scripts that need try/catches. The only things I think you can do are turn off the javascript debugger pref or save and run the script as a .jsxbin

Re: Try / Catch bug ?

Posted: December 21st, 2009, 4:27 am
by Yenaphe
Yes, it's a bug occuring when "enable java debugger" is on, and finaly I use jsxbin format to avoid it.

i've subbmitted a bug report on the online bug report form on Adobe.com, let's cross fingers and hope it will be squished in a future release.

Re: Try / Catch bug ?

Posted: February 9th, 2015, 8:39 pm
by asz
FYI. This issue is still present in CC 2014 (13.2) - boo!