@@ -73,8 +73,8 @@ def read_value(self, channel, value_type=None):
73
73
if value_type :
74
74
read_args ['value_type' ] = value_type
75
75
result = getattr (self .plugin ['instance' ], self .plugin ['read' ])(channel , ** read_args )
76
- except :
77
- error ('Error reading value from plugin {}, channel {}' .format (self .plugin_id , channel ))
76
+ except Exception as e :
77
+ error ('Error reading value from plugin {}, channel {}: {} ' .format (self .plugin_id , channel , e ))
78
78
return result
79
79
80
80
def write (self , value , channel , value_type = None ):
@@ -86,16 +86,16 @@ def write_value(self, value, channel, value_type=None):
86
86
result = None
87
87
self .set_plugin ()
88
88
if not self .plugin :
89
- error ('Plugin {} not loaded' .format (self .plugin_id ))
89
+ error ('Plugin {} is not loaded' .format (self .plugin_id ))
90
90
return result
91
91
self .set_function (channel )
92
92
try :
93
93
write_args = self .write_args
94
94
if value_type :
95
95
write_args ['value_type' ] = value_type
96
96
result = getattr (self .plugin ['instance' ], self .plugin ['write' ])(channel , value , ** write_args )
97
- except :
98
- error ('Error writing value to plugin {}, channel {}' .format (self .plugin_id , channel ))
97
+ except Exception as e :
98
+ error ('Error writing value to plugin {}, channel {}: {} ' .format (self .plugin_id , channel , e ))
99
99
return result
100
100
101
101
def register_callback (self , callback ):
0 commit comments