Skip to content

Commit

Permalink
improved error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
  • Loading branch information
guyzmo committed Apr 21, 2013
1 parent d03e4d3 commit bf2a51d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/vim-etherpad.vim
Expand Up @@ -59,7 +59,8 @@ attr_trans = {'bold': 'bold',

def excepthook(*args): # {{{
pyepad_env['disconnect'] = True
log.exception("exception caught: disconnect", exc_info=args)
vim.command('au! EpadHooks')
log.error("exception caught: disconnect", exc_info=args)
sys.excepthook = excepthook
# }}}

Expand Down Expand Up @@ -345,7 +346,7 @@ def _toggle_authors(*args): # {{{

# {{{
def _detect_and_update_change():
if not pyepad_env['epad'].has_ended():
if pyepad_env['epad'] and not pyepad_env['epad'].has_ended():
if pyepad_env['insert']:
check = lambda: vim.eval('b:changedtick') != str(int(pyepad_env['changedtick'])+2)
else:
Expand Down

0 comments on commit bf2a51d

Please sign in to comment.