Add :crash command
This commit is contained in:
parent
ee9d8e74be
commit
49803b051e
@ -195,6 +195,7 @@ class QuteBrowser(QApplication):
|
||||
'yanktitle': self.mainwindow.tabs.cur_yank_title,
|
||||
'paste': self.mainwindow.tabs.paste,
|
||||
'tabpaste': self.mainwindow.tabs.tabpaste,
|
||||
'crash': self.crash,
|
||||
}
|
||||
|
||||
handler = handlers[cmd]
|
||||
@ -222,3 +223,10 @@ class QuteBrowser(QApplication):
|
||||
tab = self.mainwindow.tabs.currentWidget()
|
||||
tab.setUrl(QUrl('about:pyeval'))
|
||||
tab.setContent(out.encode('UTF-8'), 'text/plain')
|
||||
|
||||
def crash(self):
|
||||
"""Crash for debugging purposes.
|
||||
|
||||
:crash command handler.
|
||||
"""
|
||||
raise Exception
|
||||
|
@ -193,3 +193,9 @@ class TabPaste(Command):
|
||||
"""
|
||||
|
||||
nargs = '?'
|
||||
|
||||
|
||||
class Crash(Command):
|
||||
"""Simply raise an exception for debugging."""
|
||||
nargs = 0
|
||||
hide = True
|
||||
|
Loading…
Reference in New Issue
Block a user