Adwait Kumar Singh created LANG-1590:
----------------------------------------
Summary: Adding a getCompositeException method in ExceptionUtils
Key: LANG-1590
URL: https://issues.apache.org/jira/browse/LANG-1590
Project: Commons Lang
Issue Type: New Feature
Reporter: Adwait Kumar Singh
There are use cases where people would want to throw an exception with multiple
causes. For eg, initialization of dependencies in a library or some validation.
Where it would help the developer to know about multiple failures at once.
Something like SoftAssertions in unit test.
Logging of different exceptions is a solution, however it's difficult for
libraries to choose a logging framework as there are several contenders out
there.
I propose creating a method `ExceptionUtils.getCompositeException(String
overallMessage, Throwable.. throwables` which would return a CompositeException
which would be an aggregation of the throwable.
To be precise I looking to add exactly the [CompositeException that RxJava
has|https://github.com/ReactiveX/RxJava/blob/3.x/src/main/java/io/reactivex/rxjava3/exceptions/CompositeException.java].
Would raise a PR if the proposal is accepted.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)