Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better failure behavior

  • Loading branch information...
commit d409a20844e4a2a1f09b7d78f023a514316307c3 1 parent 074b584
@jlipps authored
Showing with 3 additions and 2 deletions.
  1. +1 −1  app/ios.js
  2. +2 −1  instruments/instruments.js
View
2  app/ios.js
@@ -308,7 +308,7 @@ IOS.prototype.listWebFrames = function(cb, exitCb) {
, isDone = false;
if (!this.bundleId) {
logger.error("Can't enter web frame without a bundle ID");
- throw new Error("Tried to enter web frame without a bundle ID");
+ return cb(new Error("Tried to enter web frame without a bundle ID"));
}
var onDone = function(res) {
me.processingRemoteCmd = false;
View
3  instruments/instruments.js
@@ -201,13 +201,14 @@ Instruments.prototype.commandHandler = function(data, c) {
var hasResult = typeof data.result !== "undefined";
if (hasResult && !this.curCommand) {
logger.info("Got a result when we weren't expecting one! Ignoring it");
+ logger.info("Result was: " + JSON.stringify(data.result));
} else if (!hasResult && this.curCommand) {
logger.info("Instruments didn't send a result even though we were expecting one");
hasResult = true;
data.result = false;
}
- if (hasResult) {
+ if (hasResult && this.curCommand) {
if (data.result) {
this.debug("Got result from instruments: " + JSON.stringify(data.result));
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.