Closed ghost closed 3 years ago
If I do this I will do it alongside making it fail for queue or whatever, might just make a function to get the error reason after with enums / constants. But I think the better way would be to add a function to check if it's whitelisted on the server or not. (Or could just make it print to your console)
I still don't like the idea of trying to be the same as vanilla E2 libraries by making it silently fail rather than having functions to make sure you won't fail, since it just causes confusion
But I think the better way would be to add a function to check if it's whitelisted on the server or not. (Or could just make it print to your console)
I think both would be good features to add. Discretely printing to the clientside console would allow easier troubleshooting of E2s, and adding a function that returns an error code depending on what went wrong also allows for E2 chips to implement a form of error-recovery routine, which would contribute to the stability and flexibility of both the addon and the E2s.
This discussion can continue if someone has a problem with how it works now or if this gets integrated into wire, but right now I think it's much better than having to check if an object is invalid. I also don't like the idea of integrating it into wire (since the codebase is super old) but I mean it does seem like a god tier way to get rid of streamcore lol.
Also would be solved by https://github.com/wiremod/wire/pull/2174, way neater and more verbose than just giving the user an invalid object and giving an error catching function afterwards.
If an URL tries to play that doesn't match the whitelist, it causes the entire execution of the E2 chip to be stopped. This shouldn't happen; it should fail silently, perhaps printing an error in console, not playing the URL and continuing the execution. Having the entire E2 stop is bad for various situtations, one of them being as follows: