Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Terminal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sublime
import sublime_plugin
import errno
import os
import sys
import subprocess
Expand Down Expand Up @@ -144,9 +145,16 @@ def run_terminal(self, dir_, parameters):
subprocess.Popen(args, cwd=cwd)

except (OSError) as exception:
print(str(exception))
sublime.error_message('Terminal: The terminal ' +
TerminalSelector.get() + ' was not found')
# By default, use and log the message from our error
message = str(exception)
print(message)

# If the terminal wasn't found, then use a better message
if exception.errno == errno.ENOENT:
message = 'Terminal: The terminal ' + TerminalSelector.get() + ' was not found'

# Notify the user of the issue
sublime.error_message(message)
except (Exception) as exception:
sublime.error_message('Terminal: ' + str(exception))

Expand Down