Skip to content

Commit

Permalink
Fail more explicitly when /dump or /orientation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
moredip committed Oct 19, 2012
1 parent 4a40198 commit b8484cb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion bundle/js/controller.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()

Expand Down
9 changes: 8 additions & 1 deletion bundle/js/controller.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8484cb

Please sign in to comment.