Quotes Around Names In Error Messages
I saw this error a few minutes ago:
failed to process input: RUNTIME ERROR: function has no parameter stack
This threw me for a minute as I was trying to work out which parameter stack went missing, what I did to cause it to go missing, and what the heck a parameter stack actually is anyway.
But it had nothing to do with any sort of stack. The error message was showing up because a function call was expecting a parameter with name “stack” which was missing from the function definition.
This is why I always like putting quotes around names in logs or error messages. It removes any ambiguity about what the message is referring to. If the message was:
failed to process input: RUNTIME ERROR: function has no parameter "stack"
then you’re more likely to infer that the thing missing was a parameter with the name stack
.
Consider doing this in the error messages you write.