Sg2.9
line numbers in error messages
Recent RSS
line numbers in error messages
From:  Axel
Date:  1. October 2010, 17:53

Hi,

adding line numbers to the error messages would help debugging code.

a message like ".length does not exist" (i dont remember the exact words) doesn't help very much, as i usually have lots of for-loops containing a .length statement. Line numbers could make it more clear where to look out for a bug.

Axel

Re: line numbers in error messages
Date:  1. October 2010, 22:21

Hmm you should be getting line numbers for the exceptions.. Could you paste the code, so I can take a look at it? (or mail it to us, if it is private code)

Re: line numbers in error messages
From:  Axel
Date:  2. October 2010, 02:28

i dont get line numbers for any kind of errors. the .length issue was just an example, as i thought it might be on purpose and that there are issues that would benefit form line numbers.
but as it seems there should be line numbers. Hm.. bad. Any ideas?

thanks for your help,
Axel

Re: line numbers in error messages
From:  Jürg Lehni
Date:  2. October 2010, 09:07

Could you post the code that produces an error and does not report the line number? As Jonathan pointed out, line numbers are generally reported correctly.

Re: line numbers in error messages
From:  Axel
Date:  2. October 2010, 11:00

code (the whole document):

shape.id = 5;

so i am just calling a variable that has not been initalized yet.

Error message (whole message):

ReferenceError: "shape" is not defined.

i hope this helps you guys at least a bit,
Axel

Re: line numbers in error messages
From:  Axel
Date:  2. October 2010, 11:28

the example as a file

Re: line numbers in error messages
From:  Jürg Lehni
Date:  2. October 2010, 18:35

On my system this is what gets reported:

ReferenceError: "shape" is not defined.
at My Scripts/errortest.js:1

Could you give me more information about your system,configuration and version of Illustrator?

Re: line numbers in error messages
From:  Axel
Date:  2. October 2010, 19:00

Windows 7 Enterprise - 64 bit

taken from the Scriptographer about-Dialog:
Scriptographer 2.8.055
Illustrator 15.1
Java 1.6.0_21

i think there was a preinstalled 64bit version of java (i guess JRE, not JDK) on the computer. I installed a 32bit version and guessed that the setup should be fine as programming with Scriptographer worked.

Additionally i get the following error at every start of Scriptographer, too:

TypeError: redeclaration of const Pathfinder.

maybe this is connected

Re: line numbers in error messages
From:  Axel
Date:  4. October 2010, 20:47

for your information:

also the update to version 2.9.064 of Scriptographer didn't change it

Re: line numbers in error messages
From:  Jürg Lehni
Date:  14. October 2010, 12:12

I will look into this on PC today.

Re: line numbers in error messages
From:  Jürg Lehni
Date:  14. October 2010, 13:23

Found the error and fixed it right away. Expect an update soon:

http://github.com/lehni/scriptographer/issues/issue/148

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Variator 08.01.12