   try
     Promise.resolve(callback())
   catch error
-    Promise.reject(error)+    Promise.reject(error)

    Promise.all(
      @getItems()
        .filter((item) => item isnt @activeItem)
        .map(@destroyItem.bind(this))
    )

  promptToSaveItem: (item, options={}) ->

  # Returns a {Promise} that resolves once the pane is either closed, or the
  # closing has been cancelled.
  close: ->
    Promise.all(@getItems().map((item) => @promptToSaveItem(item))).then (results) =>
      @destroy() unless results.includes(false)

  handleSaveError: (error, item) ->
