Open ravik3592 opened 4 years ago
@ravik3592 the interpretation of the node/link topology data is performed at every animation frame, in an asynchronous method separate from the main thread. That's why you can't handle those errors with a try/catch block. The best is if you detect those cycles before feeding the data to the library. If you need some help with that, you can look at the internal source code that performs that graph traversal algorithm: https://github.com/vasturiano/force-graph/blob/master/src/dagDepths.js
I need to catch the exception and do few operations when exception occurs, but usual try catch not working in forced graph init. I need to render dag mode tree, if cyclic error occurs i need to redirect to dag mode off Is there any way to achieve this.