Page 1 of 1

Fail getting line of Exception inside a class with instance var

Posted: 01 Feb 2019, 15:56
by safetycar
I found a little inconvenience while trying to throw an exception.

A code example is this:

Code: Select all


new Example()

return

class Example
{
	InstanceVar := ""
	__New() {
		Throw, Exception("Fail", -1)
	}
}
And what is happening is that I expected to see an error pointing to line 002 but I got this:

Code: Select all

Error:  Fail

	Line#
	002: new Example()  
	004: Return
--->	000: {
	008: this.InstanceVar := ""  
	000: }
	009: {
	010: Throw,Exception("Fail", -1)
	011: }
	013: Exit
	014: Exit

The current thread will exit.
The problem seems to be on the InstanceVar, with no variables or a static variables it works ok.

I'm working around by declaring the variable inside __New().

Re: Fail getting line of Exception inside a class with instance var  Topic is solved

Posted: 21 Sep 2019, 04:12
by lexikos
This was fixed by 1.1.30.02.