JacobeanRnD / SCHVIZ

SCXML Visualization
Apache License 2.0
7 stars 1 forks source link

Return initialization errors on callback #48

Closed feyzo closed 9 years ago

feyzo commented 9 years ago

Error message: https://www.dropbox.com/s/2jcpvbj04hptp60/Screenshot%202015-01-28%2011.57.42.png?dl=0

We could do it like this:

$scope.layout = new forceLayout.Layout({ // jshint ignore:line
          kielerAlgorithm: '__klayjs',
          parent: scxmlTrace[0],
          doc: doc,
          textOnPath: false,
          routing: 'ORTHOGONAL',
          debug: false
        }, function (err) {
          console.log(err);
        });
`
mgax commented 9 years ago

I've added a try/catch block around that code and the errors get reported via the initialized promise. Unfortunately, this doesn't preserve the stack trace, and I don't know how to do that.

mgax commented 9 years ago

Do you get the error message now? Can we close the issue?