FORUMS: list search recent posts

Can I stop AE from throwing an error?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrei Popa
Can I stop AE from throwing an error?
on Feb 18, 2020 at 10:36:53 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.


Return to posts index

Andrei Popa
Re: Can I stop AE from throwing an error?
on Feb 18, 2020 at 11:06:51 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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]