Copy link to clipboard
Copied
How to write if there is an error on the open illustrator document.
Copy link to clipboard
Copied
Sorry @javithj89048510
Please imagine that you do not know how these files were created and how they are structured. And please also imagine that you do not know what the scripts do (or should do), how and in which script language they are written, nor what error messages there are or are not. You know neither the Illustrator version nor the operating system.
Please read your post again from this point of view.
Copy link to clipboard
Copied
I suggest this solution: use the try-catch statement to wrap the script!
try {
function myScript () {
throw new Error("It was a failed script :(");
}
myScript();
} catch (e) {
alert(e.message);
}
Copy link to clipboard
Copied
Thanks Silly-V
Kindly help me if illustrator have addEventListener method for javascript
Copy link to clipboard
Copied
Copy link to clipboard
Copied
There is no global onError event handler or "error" event listener which will do what I think you want.
Copy link to clipboard
Copied
Kindly help me if the illustrator has addEventListener method for javascript.