« Thoughts on the 14.1 … | Home | Xojo Desktop License … »

XojoScript Errors

Today I had a job with XojoScript and wanted to have a textual message for the error.
So I joined some information from the documentation and the xojoscript plugin's interface to build a list of errors and their documented error message.

The function looks like this and I think it's very useful:
Function ErrorToText(error as XojoScript.Errors) As string Select case error case xojoscript.Errors.Syntax // 1 return "Syntax does not make sense." case xojoscript.Errors.TypeMismatch // 2 return "Type mismatch." case xojoscript.Errors.ParserStackOverflow // 5 return "The parser's internal stack has overflowed." case xojoscript.Errors.TooManyParameters // 6 return "Too many parameters for this function." case xojoscript.Errors.NotEnoughParameters // 7 return "Not enough parameters for this function call." ... end Select End Function

Download includes enumerations, text from wiki and the complete function: errordetails.zip
05 04 14 - 22:48