-
Notifications
You must be signed in to change notification settings - Fork 472
Open
Labels
Milestone
Description
it's a commion occurance to see cryptic errors like the following:
Uncaught exception: Null access .type
Called from flixel.FlxSprite.draw(flixel/FlxSprite.hx:806)
Called from flixel.ui.FlxTypedButton_flixel_text_FlxText.draw(flixel/ui/FlxButton.hx:369)
Called from flixel.group.FlxTypedGroup.draw(flixel/group/FlxGroup.hx:180)
Called from flixel.FlxState.draw(flixel/FlxState.hx:109)
Called from flixel.FlxGame.draw(flixel/FlxGame.hx:819)
Called from flixel.FlxGame.onEnterFrame(flixel/FlxGame.hx:514)
Only to find out there is an unseen FlxG.log error that would explain the issue if the hadn't crashed laster. In the case above, the log was
[ERROR] Could not find a image asset with ID "flixel/images/ui/button.png"
if LogStyle.ERROR threw errors, the dev would have seen the more helpful error message and stack trace rather than the cryptic one.
Also, Consider adding FlxG.log.styles.ERROR
helpers, and a compiler flag FLX_THROW_ERRORS or FLX_THROW="ERROR" or something