Better error message when console-requesting ambiguous items #2174
Labels
Topic: UI/UX
Requests, Issues and Changes related to screens, artwork, sound and overall user experience
Milestone
At present if you
giveitem axe
while running JoshariasSurvival you get:org.terasology.logic.console.commandSystem.exceptions.CommandExecutionException: java.lang.IllegalArgumentException: No block found for 'axe'
Plus a big stacktrace in the game log. Works fine with plain Core. The issue is that both "Core:axe" and "ManualLabor:axe" exist, as easily visible with
search axe
- so really the problem isn't thataxe
doesn't exist, it is that the reference is too vague.We should present a user a better error message and ideally offer the available suggestions ("It looks like you're trying to request an 'axe' - did you perhaps mean 'Core:axe' or 'ManualLabor:axe'?" - with Clippy mascot optional..)
The stacktrace in the log also isn't very useful since yes we know what the issue is. Probably a simpler warning should be logged instead (and if it is giveItem maybe it should say item instead of block)
@Limeth do you think this is similar to some of the auto-completion we've done in the past or maybe something the
search
command or some other method could achieve easily? I also wonder if there's a way to makesearch axe
return only whole words or something ..The text was updated successfully, but these errors were encountered: