Is there any standard exception that can contain an Object rather than Throwable? i.e some exception interface that has getObject() method?
Is there any standard exception that can contain an Object rather than Throwable? i.e some exception interface that has getObject() method?
Are you talking about Spring or java in general?
What should the getObject() return? Throwables already provide much of the things you need - a message, a cause and the exception itself.
You can wrap objects if you want inside a custom exception.