gsimardnet / PowerQueryNet

Run M Language (Power Query Formula Language) from anywhere.
MIT License
189 stars 32 forks source link

Request: Improve error position logs for multiple files. #33

Open alazyworkaholic opened 2 years ago

alazyworkaholic commented 2 years ago

When executing multiple pq files within the same directory and a syntax error occurs PQnet will helpfully pass along the error message. If the pq file is too long the information is available in the Event Viewer, but it seems that the error message refers to a single document created from multiple .pq files. For example, an error I receive is Token Identifier expected. Start position: (2752, 27). End position (2752, 28). while my longest .pq file is less than 2752 lines.

If it's impossible/difficult to return the line number of the document containing the error and its file name, could PQnet at least (optionally?) make the combined document it creates available somewhere for debugging?

I was eventually able to find the error by subtracting line numbers and guessing at the sequence files were combined, but it was very slow.