charon github issue #134

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

charon github issue #134

Pascal Knüppel
Hi,

your developer suggested that I should ask in the mailing list for a
proper solution on my request.
The charon library currently uses checked exceptions in a ridiculous
overused way which results in heavy exception handling even in places
where it is absolutely unnecessary. An example for this are several
methods that still carry a throws declaration on the method declaration
where charon exceptions are not even thrown. I do not think that there
is a good point to not change the AbstractCharonException into a
RuntimeException.

Best regards
Pascal Knüppel

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: charon github issue #134

Ruwan Abeykoon
Hi Pascal,
I can understand the reason and frustration on the checked exception.
I really appreciate  your keen interest on making the charon library improved.

However I am not quite convinced Runtime Exception  and remove the checked exception is the correct move.

What we would need to do is to correctly redesign the public methods so that errors are conveyed to caller appropriately, so that caller function can chose to handle it, when it occurs.

Also here is what I commented on the PR for the reference
---
Charon is used by folks who uses lambda as well as folks using of checked exceptions. There are two camps who prefer checked exception and who hates.
I believe checked exception is good so that programmer can handle the errors knowingly, without surprise at the runtime where the exception is caught and unhandled.
Since this is a library used by folks from the both camps, I prefer keeping the old style for consistency.

Also alternative exists to use "wrapper"to help checked exception handling.
e.g. LambdaExceptionUtils

Hence -1 on the proposed change.
---

Cheers,
Ruwan

On Fri, Aug 31, 2018 at 8:09 PM Pascal Knüppel <[hidden email]> wrote:
Hi,

your developer suggested that I should ask in the mailing list for a
proper solution on my request.
The charon library currently uses checked exceptions in a ridiculous
overused way which results in heavy exception handling even in places
where it is absolutely unnecessary. An example for this are several
methods that still carry a throws declaration on the method declaration
where charon exceptions are not even thrown. I do not think that there
is a good point to not change the AbstractCharonException into a
RuntimeException.

Best regards
Pascal Knüppel

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev


--
Ruwan Abeykoon
Associate Director/Architect,
WSO2, Inc. http://wso2.com 
lean.enterprise.middleware.


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev