improve: add assertions to improve error message quality#7634
improve: add assertions to improve error message quality#7634vadi2 merged 1 commit intoMudlet:developmentfrom
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
Some copy and paste mistakes resulted in some error messages saying
wrong function
#### Motivation for adding to Mudlet
#### Other info (issues closed, discussion etc)
came from #7634
<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
Fix createConsole rejecting all window names.
#### Motivation for adding to Mudlet
I was testing a PR and found that I couldn't create a console.
#### Other info (issues closed, discussion etc)
#7634 added a type check on wrong variable, instead of fixing it, I'll
just rename the uses of the local variable to be consistent with others
|
Just switched to a testing version and got hit with this. I can fix it just fine for my own scripts, but this -does- break scripts. Previously gmcp values could be fed directly to gauges in string form, now they choke on the assert and require manual coercion. Perhaps it would be better to |
|
Agreed, we don't intend to break existing scripts for the sake of correctness. |
|
without checking, for which function? |
|
I noticed it with setGauge, but it likely applies to more than just that one. Apologies, I had meant to mention that in the prior message. |
Brief overview of PR changes/additions
Add assertions to improve error message quality such as checking of argument types.
Motivation for adding to Mudlet
Better scripting experience. More understandable error messages.
Other info (issues closed, discussion etc)
closes #2890
/claim #2890