my dog learned polymorphism
The moose likes Beginning Java and the fly likes Throwable as Exception's constructor argument Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Throwable as Exception Watch "Throwable as Exception New topic

Throwable as Exception's constructor argument

M Berg

Joined: Sep 01, 2010
Posts: 13
Hi experts,

I have seen examples on throwing own exceptions with first two constructor styles, but not with Throwable object reference as argument.
What's the idea with Throwable as argument? Appreciate any real life simple example on that.

Many thanks again,
Kind regards MB
Stephan van Hulst

Joined: Sep 20, 2010
Posts: 4616

The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46349
You will probably find something useful in the Java™ Tutorials ( look for "chained exceptions").
I agree. Here's the link:
subject: Throwable as Exception's constructor argument
It's not a secret anymore!