albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
913 stars 156 forks source link

Implement sq_throwerrorf to allow formatted error messages. #180

Closed iSLC closed 5 years ago

iSLC commented 5 years ago

Not sure if needed but I often find myself wanting to include some runtime information into my error messages.

I wasn't sure about the goto approach but it simplified code quite a bit and I noticed it was used in other parts of the code as well.

albertodemichelis commented 5 years ago

I think this one should be sqstd_throwerrorf.

iSLC commented 5 years ago

Good idea. Should I make it part of sqstdaux or a separate file?

On that note, would a sq_pushstringf in sqstdstring work too?

albertodemichelis commented 5 years ago

I can't decide both aux and string are fine. your call.