You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recently added AdsOverMQTT connection type now throws a barebone Exception with some message as AmsServer 'AdsOverMqtt' is not set!
While I understand that there is a way to configure the connection to be ADS-only, I still believe that the exception here should be some sort of AmsServerException or other identifiable implementation and not a random Exception to handle it distinctly.
Note that previously, with no connection setup, it was either LoopbackNotRegisteredException or AdsServerException that was thrown here and it was possible to rely on that to handle the cases. Now one would need to rely on the message of the exception which is undesired.
Please consider using some existing exception type such as AdsServerException or add a new type instead (as suggested above: AmsServerException sounds legit to me) instead of falling back to generic Exception type.
System.Exception: AmsServer 'AdsOverMqtt' is not set!
at TwinCAT.Ads.AmsServerComposition.GetServerFactory(ChannelProtocol channelProtocol)
at TwinCAT.Ads.Server.AmsServer.createDIChannel(ChannelProtocol requestedProtocol, ChannelPortType requestedPortType)
at TwinCAT.Ads.Server.AmsServer.createServerImplementation(ChannelProtocol requestedProtocol, ChannelPortType requestedPortType)
at TwinCAT.Ads.Server.AmsServer.ConnectServer()
at TwinCAT.Ads.Server.AdsServer.ConnectServer()
at TwinCAT.Ads.AdsClient.Connect(AmsAddress address)
at TwinCAT.Ads.AdsConnection.OnConnect()
at TwinCAT.Ads.AdsConnection.Connect()
at TwinCAT.Ads.AdsSessionBase.OnConnect(Boolean reconnect)
at TwinCAT.Session.Connect()
The text was updated successfully, but these errors were encountered:
Hmm, when I browse through the repository I can't find “AmsServer” anywhere. I somehow have the strong suspicion that you have landed in the wrong repository here. How did you end up here? I can only assume you are actually using .NET?
The recently added AdsOverMQTT connection type now throws a barebone
Exception
with some message asAmsServer 'AdsOverMqtt' is not set!
While I understand that there is a way to configure the connection to be ADS-only, I still believe that the exception here should be some sort of
AmsServerException
or other identifiable implementation and not a randomException
to handle it distinctly.Note that previously, with no connection setup, it was either
LoopbackNotRegisteredException
orAdsServerException
that was thrown here and it was possible to rely on that to handle the cases. Now one would need to rely on the message of the exception which is undesired.Please consider using some existing exception type such as
AdsServerException
or add a new type instead (as suggested above:AmsServerException
sounds legit to me) instead of falling back to genericException
type.The text was updated successfully, but these errors were encountered: