Jump to content
  • Advertisement
Sign in to follow this  
mandrav

Error info?

This topic is 4786 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A quick one: If I have errors in my script, when calling Build() it returns asERROR. Is it possible to get the line number of the error? It is printed in the output stream but I want to know if I have access to this info. For example, consider a script debugger. You write a script, try to execute it and it contains errors. Can the app know the error line number to focus it in the editor? (I am *not* writing a debugger, just mentioning it as an example). Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Deyja
Quote:
It is printed in the output stream


Looks like you answered your own question.


I don't consider myself *that* stupid, thank you.

I said I want to access the line number in code. Yes, I see it on the screen but I need my code to "see" it to open the script in an editor and position the caret on the error line.

Share this post


Link to post
Share on other sites
The script engine doesn't store the line numbers where errors or warnings occurred. The best way to do it is to parse the error messages as they are written to the output stream. The message format is quite easy to parse so this shouldn't require much work from the application programmer.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!