HaxeFlixel / HaxeFlixel/flixel-ui

The error when the xml file is not found / parsable is not easy to understand

Open
#150 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haxe
Stars
201
Forks
75
PR merge metrics
No merged PRs in 30d

Description

Hi !
When I create a FlxUIState, I set the _xml_id with a filename.
If this file does not exists (typo in the name, added the ".xml" to the filename, ...) or if it's not parsable (error in the XML), here is the error I get :

Invalid field access : h
Called from flixel/addons/ui/FlxUI.hx line 1354
Called from flixel/addons/ui/FlxUITooltipManager.hx line 63 
Called from flixel/addons/ui/FlxUIState.hx line 206
...

It's very hard to debug.
It could be interesting to have an error more explicit.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at flixel/addons/ui/FlxUI.hx line 1354 and trace the XML-loading path back through FlxUIState.hx line 206 and FlxUITooltipManager.hx line 63. Done means missing or unparsable XML produces an explicit, understandable error instead of the reported invalid field access.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.