@@ -85,6 +85,9 @@ public class BrokerUnreachableException: IOException
85
85
///each endpoint.</summary>
86
86
public IDictionary ConnectionErrors { get { return m_connectionErrors ; } }
87
87
88
+ ///<summary>same as ConnectionErrors property</summary>
89
+ public override IDictionary Data { get { return m_connectionErrors ; } }
90
+
88
91
///<summary>Construct a BrokerUnreachableException. Expects
89
92
///maps as per the description of the ConnectionAttempts and
90
93
///ConnectionErrors properties.</summary>
@@ -103,19 +106,12 @@ public override string ToString() {
103
106
StringBuilder sb = new StringBuilder ( base . Message ) ;
104
107
sb . Append ( "\n Endpoints attempted:\n " ) ;
105
108
foreach ( DictionaryEntry entry in m_connectionAttempts ) {
106
- sb . Append ( " endpoint=" ) ;
107
- sb . Append ( entry . Key ) ;
108
- sb . Append ( ", attempts=" ) ;
109
- sb . Append ( entry . Value ) ;
110
- sb . Append ( ", outcome=" ) ;
111
- Exception e = m_connectionErrors [ entry . Key ] as Exception ;
112
- if ( e == null ) {
113
- sb . Append ( "(null)" ) ;
114
- } else {
115
- sb . Append ( e . Message ) ;
116
- }
117
- sb . Append ( "\n " ) ;
109
+ sb . Append ( "------------------------------------------------\n " ) ;
110
+ sb . Append ( "endpoint=" ) . Append ( entry . Key ) ;
111
+ sb . Append ( ", attempts=" ) . Append ( entry . Value ) . Append ( "\n " ) ;
112
+ sb . Append ( m_connectionErrors [ entry . Key ] as Exception ) ;
118
113
}
114
+ sb . Append ( "\n ================================================\n " ) ;
119
115
sb . Append ( "Stack trace:\n " ) ;
120
116
sb . Append ( base . StackTrace ) ;
121
117
return sb . ToString ( ) ;
0 commit comments