From 8943cd117e6a95e26f01d962966e44ed03c40539 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 26 Mar 2024 01:12:46 -0400 Subject: [PATCH] Make the error message a bit better if an Animate atlas fails to parse. --- .../funkin/play/character/AnimateAtlasCharacter.hx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/funkin/play/character/AnimateAtlasCharacter.hx b/source/funkin/play/character/AnimateAtlasCharacter.hx index 9e7aa98bf..f1dadf3e2 100644 --- a/source/funkin/play/character/AnimateAtlasCharacter.hx +++ b/source/funkin/play/character/AnimateAtlasCharacter.hx @@ -76,10 +76,17 @@ class AnimateAtlasCharacter extends BaseCharacter { trace('Creating Animate Atlas character: ' + this.characterId); - var atlasSprite:FlxAtlasSprite = loadAtlasSprite(); - setSprite(atlasSprite); + try + { + var atlasSprite:FlxAtlasSprite = loadAtlasSprite(); + setSprite(atlasSprite); - loadAnimations(); + loadAnimations(); + } + catch (e) + { + throw "Exception thrown while building FlxAtlasSprite: " + e; + } super.onCreate(event); }