summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/ui.py5
-rw-r--r--ranger/gui/widgets/console.py10
-rw-r--r--ranger/gui/widgets/pager.py5
-rw-r--r--ranger/gui/widgets/taskview.py5
4 files changed, 20 insertions, 5 deletions
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 771f0b2a..c7c4a14b 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -138,7 +138,10 @@ class UI(DisplayableContainer):
 			if hasattr(self, 'hint'):
 				self.hint(cmd.text)
 		elif hasattr(cmd, 'execute'):
-			cmd.execute_wrap(self)
+			try:
+				cmd.execute_wrap(self)
+			except Exception as error:
+				self.fm.notify(error)
 			self.env.key_clear()
 
 	def get_next_key(self):
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 90192bee..6cf00b14 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -123,7 +123,10 @@ class Console(Widget):
 		if cmd == self.commandlist.dummy_object:
 			return
 
-		cmd.execute_wrap(self)
+		try:
+			cmd.execute_wrap(self)
+		except Exception as error:
+			self.fm.notify(error)
 		self.env.key_clear()
 
 	def type_key(self, key):
@@ -265,7 +268,10 @@ class CommandConsole(ConsoleWithTab):
 			cmd = self._get_cmd()
 
 		if cmd:
-			cmd.execute()
+			try:
+				cmd.execute()
+			except Exception as error:
+				self.fm.notify(error)
 
 		Console.execute(self)
 
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py
index c14e0efb..52de9ccf 100644
--- a/ranger/gui/widgets/pager.py
+++ b/ranger/gui/widgets/pager.py
@@ -170,7 +170,10 @@ class Pager(Widget):
 			self.env.key_clear()
 		else:
 			if hasattr(cmd, 'execute'):
-				cmd.execute_wrap(self)
+				try:
+					cmd.execute_wrap(self)
+				except Exception as error:
+					self.fm.notify(error)
 				self.env.key_clear()
 	
 	def set_source(self, source, strip=False):
diff --git a/ranger/gui/widgets/taskview.py b/ranger/gui/widgets/taskview.py
index 909577d8..a99a567e 100644
--- a/ranger/gui/widgets/taskview.py
+++ b/ranger/gui/widgets/taskview.py
@@ -102,7 +102,10 @@ class TaskView(Widget, Accumulator):
 			self.env.key_clear()
 		else:
 			if hasattr(cmd, 'execute'):
-				cmd.execute_wrap(self)
+				try:
+					cmd.execute_wrap(self)
+				except Exception as error:
+					self.fm.notify(error)
 				self.env.key_clear()
 	
 	def get_list(self):