Skip to content

Unnecessary exception when no 7tv emotes for a channel #63

@Kesuaheli

Description

@Kesuaheli

When adding multiple channels to the config, it's very likly you'll find a situation where (at least) one channel has 7tv emotes you want to use, but (at least) another one doesn't have 7tv emotes at all.

Obviously, you'll enable 7tv channel emotes in the config to use the emotes that exist.

Problem

The mod tries to fetch 7tv emotes from all configured channels.
If a channel doesn't have 7tv emotes, the mod throws this exception

Failed to load 7TV <CHANNEL NAME> emotes
xeed.mc.streamotes.api.EmoteLoaderException: Unhandled exception
	at knot//xeed.mc.streamotes.addon.pack.X7tvChannelPack.loadMetadata(X7tvChannelPack.java:48)
	at knot//xeed.mc.streamotes.Streamotes.lambda$processPacks$5(Streamotes.java:188)
	at knot//xeed.mc.streamotes.Streamotes.tryFewTimes(Streamotes.java:122)
	at knot//xeed.mc.streamotes.Streamotes.lambda$processPacks$6(Streamotes.java:188)
	at knot//xeed.mc.streamotes.Streamotes.lambda$startLoadingDaemon$3(Streamotes.java:97)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalStateException: Not a JSON Object: null
	at knot//com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:165)
	at knot//xeed.mc.streamotes.addon.pack.X7tvChannelPack.loadMetadata(X7tvChannelPack.java:26)
	... 5 more

Expected behaviour

The mod skip loading 7tv emotes for this channel entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions