Constructor with a nested exception. This constructor is
package-private because it arrived too late for the JMX 1.2
specification. A later version may make it public.
super(message);
/* Make a best effort to set the cause, but if we don't
succeed, too bad, you don't get that useful debugging
information. We jump through hoops here so that we can
work on platforms prior to J2SE 1.4 where the
Throwable.initCause method was introduced. If we change
the public interface of JMRuntimeException in a future
version we can add getCause() so we don't need to do this. */
try {
java.lang.reflect.Method initCause =
Throwable.class.getMethod("initCause",
new Class[] {Throwable.class});
initCause.invoke(this, new Object[] {cause});
} catch (Exception e) {
// OK: just means we won't have debugging info
}