Package javax.management

Examples of javax.management.MBeanException.initCause()


        Assert.assertEquals(null, mbe.getMessage());
        Assert.assertEquals(null, mbe.getTargetException().getMessage());

        targetEx = new Exception("actual message");
        mbe = new MBeanException(targetEx);
        mbe.initCause(targetEx);
        Assert.assertEquals(targetEx, mbe.getCause());
        Assert.assertEquals(null, mbe.getMessage());

        mbe = toMBeanException(null, null);
        Assert.assertEquals(null, mbe.getMessage());
View Full Code Here


                                                    final String    msg )
    {
        final String s = getMessage(e, msg);
        final Exception cause = (e != null) ? e : new Exception(s);
        MBeanException mbe = new MBeanException(cause, s);
        mbe.initCause(cause);
        return mbe;
    }

    /**
     * @param t
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.