Try / Catch bug ?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

November 20th, 2009, 7:13 am

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 ?
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

November 23rd, 2009, 3:39 pm

Hey Seb,

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

-Lloyd
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

November 30th, 2009, 6:24 am

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.
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

December 19th, 2009, 4:50 am

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
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

December 21st, 2009, 4:27 am

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.
asz
Posts: 1
Joined: February 9th, 2015, 3:26 pm

February 9th, 2015, 8:39 pm

FYI. This issue is still present in CC 2014 (13.2) - boo!
Post Reply