🐛Debugging
throw new Error("Error is:" +Value);
Error handling in After Effects can be achieved using JavaScript and the try-catch statement. Here's an example of how you can add error handling to your code:
try {
var path = thisComp.layer("SEG-1").content("Path 1").path;
var trimPath = thisComp.layer("SEG-1").content("Trim Paths 1").end/100;
var targetLayer = thisComp.layer("SEG-1");
var point = path.pointOnPath(trimPath);
targetLayer.toComp(Point);
} catch (e) {
alert("An error occurred: " + e);
}
Last updated