Add :crash command

This commit is contained in:
Florian Bruhin 2014-01-30 14:58:32 +01:00
parent ee9d8e74be
commit 49803b051e
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -193,3 +193,9 @@ class TabPaste(Command):
"""
nargs = '?'
class Crash(Command):
"""Simply raise an exception for debugging."""
nargs = 0
hide = True