Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

send complex data

  • Loading branch information...
commit 6e5a45572569aa24311940b24085459aa0c4ddb8 1 parent 0810ada
@joeferner joeferner authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 client/client.js
View
15 client/client.js
@@ -98,7 +98,20 @@ RemoteJSDebugger.prototype.send = function (msg, object) {
};
RemoteJSDebugger.prototype.sendResult = function (result) {
- this.send('cmdresult', result);
+ try {
+ this.send('cmdresult', result);
+ } catch(ex) {
+ // can't send it the easy way send a simplified version.
+ var data = {};
+ for(var k in result) {
+ if(result[k]) {
+ data[k] = result[k].toString();
+ } else {
+ data[k] = result[k];
+ }
+ }
+ this.send('cmdresult', data);
+ }
};
RemoteJSDebugger.prototype.sendException = function (exception) {
Please sign in to comment.
Something went wrong with that request. Please try again.