public static String toString(Throwable e) {
        StackTraceElement[] traces = e.getStackTrace();
        StringBuilder sb = new StringBuilder(1024);
        sb.append(e.toString()).append("\n");
        if (traces != null) {
            for (StackTraceElement trace : traces) {
                sb.append("\tat ").append(trace).append("\n");
            }
        }
        return sb.toString();
    }
@Test
    public void testToString() throws Exception {
        SofaRpcException exception = new SofaRpcException(RpcErrorType.SERVER_BUSY, "111");
        String string = ExceptionUtils.toString(exception);
        Assert.assertNotNull(string);
        Pattern pattern = Pattern.compile("at");
        Matcher matcher = pattern.matcher(string);
        int count = 0;
        while (matcher.find()) {
            count++;
        }
        Assert.assertTrue(count > 1);
    }