Highlighted

try/catch crash at least once, and requires debugger opened

New Here ,
May 24, 2020

Copy link to clipboard

Copied

Hi,

 

After-Effects has a problem with try {} catch() {} in scripts.

I will refer to "debugger" as "Extendscript Toolkit CC"

 

Given the following script:

 

try {
  throw new Error("test");
}
catch(e) {
  $.writeln("message: " + e.message);
}

 

If I open AE, then run the following script via command line `AfterFx.com -r myscript.jsx`, then the debugger opens, the line "throw new Error.." has a breakpoint and an error message with "uncaught exception".

 

If I close the debugger, and run again this script via the command line, it crash again and again.

If I don't close the debugger, and run again the script via the cli, it works and displays "message: test" !

 

If I run again this script via the debugger after AE startup, then it works directly.

 

Anyone has found out how to get rid of this behavior ? 

TOPICS
Scripting

Views

507

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

try/catch crash at least once, and requires debugger opened

New Here ,
May 24, 2020

Copy link to clipboard

Copied

Hi,

 

After-Effects has a problem with try {} catch() {} in scripts.

I will refer to "debugger" as "Extendscript Toolkit CC"

 

Given the following script:

 

try {
  throw new Error("test");
}
catch(e) {
  $.writeln("message: " + e.message);
}

 

If I open AE, then run the following script via command line `AfterFx.com -r myscript.jsx`, then the debugger opens, the line "throw new Error.." has a breakpoint and an error message with "uncaught exception".

 

If I close the debugger, and run again this script via the command line, it crash again and again.

If I don't close the debugger, and run again the script via the cli, it works and displays "message: test" !

 

If I run again this script via the debugger after AE startup, then it works directly.

 

Anyone has found out how to get rid of this behavior ? 

TOPICS
Scripting

Views

508

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 24, 2020 0
Enthusiast ,
May 24, 2020

Copy link to clipboard

Copied

I'm not sure why you are receiving that behavior, but Adobe has deprecated ExtendScript Toolkit in favor of their new debugger plugin for Microsoft Code.  Have you tried with that debugger?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 24, 2020 0
New Here ,
May 25, 2020

Copy link to clipboard

Copied

I will try later after uninstalling ESTK, I fear the fact of not being able to debug CEP extensions (extenscript part) & Panels.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 25, 2020 0
Adobe Community Professional ,
May 26, 2020

Copy link to clipboard

Copied

Not sure  about VS Code, but ExtendScript Toolkit has a menu entry

"Debug->Do not break on guarded exceptions"

Does it help to activate this?

Screenshot 2020-05-26 12.30.57.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2020 0
New Here ,
May 26, 2020

Copy link to clipboard

Copied

Thanks, but it is already enabled by default.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2020 0