Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can I stop AE from throwing an error?

  • Can I stop AE from throwing an error?

    Posted by Andrei Popa on February 18, 2020 at 10:36 am

    Hi guys. I am trying to serialize some variable using this json2 library.
    https://github.com/douglascrockford/JSON-js/blob/master/json2.js

    The problem is, when trying to check property[“maxValue”] for position, AE throws an error: “Property has no maximum value.”. This breaks my code. If I check the model viewer, maxValue is null. If i check the console while the error is thrown, the result is null. If i try it in the console while the error is not thrown, it throws the error.

    Is there any chance i can stop AE from throwing this error? I tried putting the value attribution inside a try catch statement but it still throws the error while in the JSON2 library.
    Works if the only code in my script is the try catch phrase.
    But if i try it inside the JSON2 library, it throws an error just before try. I don’t know why and ran out of ideas to test.
    The error appears at rows 244(var value = holder[key];) for values holder = scale, key = “maxValue”.
    I replaced that row with this and still got the error before the try/catch phrase:


    var value;
    try{
    value = holder[key];
    }catch (e){
    value = null;
    }

    Any help or hint is greatly appreciated.

    Andrei
    My Envato portfolio.

    Andrei Popa replied 6 years, 3 months ago 1 Member · 1 Reply
  • 1 Reply
  • Andrei Popa

    February 18, 2020 at 11:06 am

    And if i try to bypass the maxValue property by skipping this name i get an error on two different rows, which i did not even know was possible.

    Andrei
    My Envato portfolio.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy