Permalink
Browse files

Fail more explicitly when /dump or /orientation fails

  • Loading branch information...
moredip committed Oct 19, 2012
1 parent 4a40198 commit b8484cb73b2a3bd6486b2c97fbf6d899cf2e88ad
Showing with 15 additions and 2 deletions.
  1. +1 −0 README.md
  2. +6 −1 bundle/js/controller.coffee
  3. +8 −1 bundle/js/controller.js
View
@@ -17,6 +17,7 @@ open http://localhost:9292
## TODO
+- populate engine list from API call
- Mouse over ersatz to highlight view in hierarchy
- history of selectors
@@ -104,7 +104,7 @@ define ['frank'],(frank)->
reload = ->
deferable = $.Deferred()
- $.when( frank.fetchViewHeirarchy(), frank.fetchOrientation() ).done ([rawHeir,],orientation)->
+ $.when( frank.fetchViewHeirarchy(), frank.fetchOrientation() ).done( ([rawHeir,],orientation)->
deviceFamily = guessAtDeviceFamilyBasedOnViewDump(rawHeir)
treeView.model.resetViewHeir(rawHeir)
@@ -115,6 +115,11 @@ define ['frank'],(frank)->
ersatzView.render()
deferable.resolve()
+ ).fail( (args...)->
+ toastController.showToastMessage('encountered an error while talking to Frank')
+ window.alert( "Ruh roh. Encountered an error while talking to Frank.\nSee the javascript console for all the details" )
+ console.log( "Failed while talking to Frank.", args )
+ )
deferable.promise()
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit b8484cb

Please sign in to comment.