update try catch on Ampt class

This commit is contained in:
atef 2023-10-23 10:05:06 +02:00
parent 05926994b7
commit 01f1def61b
1 changed files with 4 additions and 2 deletions

View File

@ -31,9 +31,11 @@ public class AmptDevices
{ {
return TryRead(); return TryRead();
} }
catch (Exception e) catch ( Exception e)
{ {
Console.WriteLine("Failed to read Ampt data \n" + e.Message); if( e is not NullChannelException)
Console.WriteLine("Failed to read Ampt data \n" + e.Message);
return null; return null;
} }
} }