Rethrow exceptions during undo, redo, and pushOperation

This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-01-04 13:20:34 -07:00
parent c5e6a7428d
commit 725c4cf132
2 changed files with 17 additions and 13 deletions

View File

@@ -25,8 +25,8 @@ class UndoManager
try
operation.do?(editSession)
catch e
console.error e.stack
@clear()
throw e
transact: (fn) ->
isNewTransaction = not @currentTransaction?
@@ -65,8 +65,8 @@ class UndoManager
@redoHistory.push batch
batch.oldSelectionRanges
catch e
console.error e.stack
@clear()
throw e
redo: (editSession) ->
try
@@ -78,5 +78,5 @@ class UndoManager
@undoHistory.push(batch)
batch.newSelectionRanges
catch e
console.error e.stack
@clear()
throw e