Unhandled Exception TempAnlage
Wenn die TempCAN keine Verbindung aufgbauen kann wird keine Unhandled Exception mehr ausgegeben
This commit is contained in:
@@ -26,8 +26,18 @@ namespace TempCAN
|
||||
{
|
||||
IPConnection ipcon = new IPConnection();
|
||||
BrickletTemperature t = new BrickletTemperature(UID, ipcon);
|
||||
|
||||
ipcon.Connect(HOST, PORT);
|
||||
try
|
||||
{
|
||||
ipcon.Connect(HOST, PORT);
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
erfolg = false;
|
||||
ipcon = null;
|
||||
t = null;
|
||||
return;
|
||||
}
|
||||
|
||||
short temp;
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user