File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
agent/Modules/MTConnect.NET-AgentModule-MqttRelay Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -214,9 +214,19 @@ private async Task Worker()
214
214
await Task . Delay ( 100 ) ;
215
215
}
216
216
}
217
- catch ( Exception ex )
217
+ catch ( Exception exception )
218
218
{
219
- Log ( MTConnectLogLevel . Warning , $ "MQTT Relay Connection Error : { ex . Message } ") ;
219
+ Log ( MTConnectLogLevel . Warning , $ "MQTT Relay Connection Error : { exception . Message } ") ;
220
+
221
+ var innerException = exception . InnerException ;
222
+
223
+ while ( innerException != null )
224
+ {
225
+ Log ( MTConnectLogLevel . Warning , $ "MQTT Relay Connection Error (InnerException) : { innerException . Message } ") ;
226
+ innerException = innerException . InnerException ;
227
+ }
228
+
229
+ Log ( MTConnectLogLevel . Warning , $ "MQTT Relay Connection Error (BaseException) : { exception . GetBaseException ( ) . ToString ( ) } ") ;
220
230
}
221
231
finally
222
232
{
You can’t perform that action at this time.
0 commit comments