Control Error Expression
by Tiago Cav on Jun 3, 2015 at 1:54:56 pm Last Edited By Tiago Cav on Jun 3, 2015 at 2:08:41 pm
I'm using an expression with "sourceRectAtTime ()" in the Scale of a text. Works correctly, but when I turn out the text completely, the expression results in an error. Because try to find a value in "sourceRectAtTime ()" which is 0, but my expression is a calculation that divides a value by "sourceRectAtTime ()". And can not divide a value by 0, this is the error.
Is possible use a try/catch block which will test a block of code for errors while executing; if an error in the try block occurs, then the catch block is executed.
But I do not understand how it applies.
I want to know how to use it for use when no letters in the text layer, not cause mistake, just turn off the expression.
I want to know, also:
How to represent "None" in an expression?
I need use this Expression, adding a control of Errors. s = 70/sourceRectAtTime().height * 100;