 MarkerStore = require "./marker-store"
 {spliceArray, newlineRegex} = require './helpers'
 
-TransactionAborted = Symbol("transaction aborted")
+class TransactionAbortedError extends Error
+  constructor: -> super
 
 # Extended: A mutable text container with undo/redo support and the ability to
 # annotate logical regions in the text.

      result = fn()
    catch exception
      @revertToCheckpoint(checkpoint)
      throw exception unless exception is TransactionAborted
      return
    finally
      @transactCallDepth--

    result

  abortTransaction: ->
    throw new TransactionAbortedError("Transaction aborted.")

  # Public: Clear the undo stack.
  clearUndoStack: -> @history.clearUndoStack()
