I’m using XojoScript to compile user-entered code.
When I get a CompilerError, I get an error number and an errorInfo dictionary.
Now, let’s see how this looks for a type mismatch error, like when passing the wrong type to a parameter.
I then get the error 201, which I can look up at Page Not Found — Xojo documentation
I find:
201: Parameter ‘%1’ expects %2, but this is %3.
So I need to fill in the three placeholders with the data from errorInfo.
The errorInfo dictionary contains these keys:
Name: …
FirstType: …
SecondType: …
That is not helpful because, well, how do I know which of these Keys belong to which parameter? This seems like a bug to me, as it makes the task impossible. Either the error msgs should use the key names for the placeholders, or the keys should use numbers that match the placeholder numbers.
Or is there some other info that would help me with this?