COMMUNITY

Context.makePosition does not create the right position

macro

(Remco Huijser) #1

I am using a macro where I build part of a class by reading and parsing an html template file. If for some reason the information in the html file is not correct I want to raise an error.

The error raising is simple: just call Context.error(message, position).
As far as I understood I can create a position using Context.makePosition which takes a path to the file and a min and max value indicating the part of the file. This approach works fine for things that are on the first line of the html. For positions on anything other than the first line, the highlighting (and clicking the error in the Problems tab) is just not pointing to the right location.

I think I might be missing something, but not sure what…

Thanks!