When you wrap an exception that is the root cause in another exception.
The
Servlet Spec makes use of it.
the doGet, doPost etc. methods of HttpServlet throw a ServletException.
Imagine code like this.
You chain the SQLException together with the ServletException since you cannot throw it yourself (the signature does not allow this)
ServletException itself has a method called getRootCause() that returns the Exception you chained.