File tree Expand file tree Collapse file tree
agent/Modules/MTConnect.NET-AgentModule-MqttRelay Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,9 +214,19 @@ private async Task Worker()
214214 await Task . Delay ( 100 ) ;
215215 }
216216 }
217- catch ( Exception ex )
217+ catch ( Exception exception )
218218 {
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 ( ) } ") ;
220230 }
221231 finally
222232 {
You can’t perform that action at this time.
0 commit comments