Sha256: 8a8a1e29fba44a08a0303872cf27277db63ca028bd9d9a47b2949f01238bbef3

Contents?: true

Size: 516 Bytes

Versions: 12

Compression:

Stored size: 516 Bytes

Contents

class Transponder.Error
  response: null

  constructor: ->
    doc = $(document)
    doc.ajaxError(@handleError)

  handleError: (event, xhr, settings, error) ->
    unless xhr.responseText is ""
      @response = JSON.parse(xhr.responseText) 
      eventType = Transponder.buildEvent ['ujs', @response.module, @response.controller, @response.action]
      $(document).trigger(eventType, @response)

class Transponder.InvalidService
  constructor: (message) ->   
    @message = message
    @name = "InvalidService"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
transponder-2.0.0 lib/assets/javascripts/transponder/error.coffee
transponder-1.0.0 lib/assets/javascripts/transponder/error.coffee
transponder-0.10.4 lib/assets/javascripts/transponder/error.coffee
transponder-0.10.2 lib/assets/javascripts/transponder/error.coffee
transponder-0.10.1 lib/assets/javascripts/transponder/error.coffee
transponder-0.9.6 lib/assets/javascripts/transponder/error.coffee
transponder-0.9.5 lib/assets/javascripts/transponder/error.coffee
transponder-0.9.4 lib/assets/javascripts/transponder/error.coffee
transponder-0.9.3 lib/assets/javascripts/transponder/error.coffee
transponder-0.9.2 lib/assets/javascripts/transponder/error.coffee
transponder-0.9.0 lib/assets/javascripts/transponder/error.coffee
transponder-0.8.2 lib/assets/javascripts/transponder/error.coffee