src/eric7/MicroPython/Devices/DeviceBase.py

branch
mpy_network
changeset 9779
8d3c7c991085
parent 9776
210bf87ae5c7
child 9781
3112f77f722b
--- a/src/eric7/MicroPython/Devices/DeviceBase.py	Sat Feb 18 18:12:32 2023 +0100
+++ b/src/eric7/MicroPython/Devices/DeviceBase.py	Sun Feb 19 14:45:16 2023 +0100
@@ -417,9 +417,24 @@
         """
         return []
 
-    ##################################################################
-    ## Methods below implement the file system commands
-    ##################################################################
+    def _showError(self, method, error):
+        """
+        Protected method to show some error message.
+
+        @param method name of the method the error occured in
+        @type str
+        @param error error message
+        @type str
+        """
+        EricMessageBox.warning(
+            self,
+            self.tr("Error handling device"),
+            self.tr(
+                "<p>There was an error communicating with the"
+                " connected device.</p><p>Method: {0}</p>"
+                "<p>Message: {1}</p>"
+            ).format(method, error),
+        )
 
     def _shortError(self, error):
         """
@@ -439,6 +454,10 @@
 
         return self.tr("Detected an error without indications.")
 
+    ##################################################################
+    ## Methods below implement the file system commands
+    ##################################################################
+
     def ls(self, dirname=""):
         """
         Public method to get a directory listing of the connected device.

eric ide

mercurial