Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions usually are swallowed #6

Open
schw4rzlicht opened this issue Apr 6, 2018 · 7 comments
Open

Exceptions usually are swallowed #6

schw4rzlicht opened this issue Apr 6, 2018 · 7 comments

Comments

@schw4rzlicht
Copy link

The usual behavior of artnet4j is to log Exceptions using Logger instances when they are thrown. This is a design flaw imo since Exceptions are a good thing for devs who use the lib because they can catch them to recover from errors or at least notify the user.

In my use case, I let the user decide on which network interface they want to send Art-Net. When it's not possible to use the chosen interface for whatever reason, I'm not even able to tell this to the user in any way (not a console app). So the UI looks like everything is working but no packets are being sent.

I'd propose to at least being able to disable logging and re-throw Exceptions using flags/environment variables or to resign from logging all together - in favor of catchable Exceptions.

@cansik
Copy link
Owner

cansik commented Apr 6, 2018

Yep, I see it the same way as you do. I think the best thing is to gather all this refactoring ideas and then rewrite the library from scratch. Because there are a lot of architectural things I would like to change, which also includes error handling.

@schw4rzlicht
Copy link
Author

Sounds good. Do you already have a timeline for that?
I need a quick solution for my current project since it needs to be ready for this summers' festivals. However, it wont be a problem to find a fix for this issue (and my current project) by myself if you mind changing the current library and then participate on the new library if you'd like.

@cansik
Copy link
Owner

cansik commented Apr 10, 2018

No I do not have a timeline for that at the moment. I can understand that you need it for your project as quick as possible, but my master thesis needs a bit of attention too ;)

Maybe I can propose a new library architecture this weekend, but I think the development process won't be that fast as you need it.

@schw4rzlicht
Copy link
Author

Like I said, no worries :) Take your time and I am happy to participate when you find the time.

@schw4rzlicht
Copy link
Author

Hey @cansik I started to build a new library from scratch. You can find it here. Every contribution would be great, maybe this is also a good place to merge existing stuff?

@cansik
Copy link
Owner

cansik commented May 2, 2020

@schw4rzlicht Looks great! I just missed this notification :) I will try it out later 🙌🏻

@schw4rzlicht
Copy link
Author

Let me know when you had the time to check it out and let me know what you think :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants