codingdir logo sitemap sitemap |

Why property ''cause" of Exception is repeating forever?

By : , Category : java

Do you have access to source where this Exception was created?

Looks like the HttpClientErrorException object was created and then its cause field was modified to be the same object, perhaps using initCause.

ReLated :


I usually wrap the delegates with exception handling because as you said a block's exception is stored in the Completion task and moreover a faulted block stays faulted so you would need to replace it to move on.

var block = new TransfromBlock<string, int>(number =>
        return int.Parse(number);
    catch (Exception e)


Another important issue is capping. If some part of your workflow can't handle the load, it's input queue would simply grow infinitely. That could lead to a memory leak or OutOfMemoryExceptions. So it's important to make sure to limit all your blocks with the appropriate BoundedCapacity and decide what to do when that limit is reached ("throw" items, save to storage, etc.)


While the default value for BoundedCapacity is -1 (unbounded), the default value for MaxDegreeOfPrallelism is 1 (no parallelism). Most applications can easily benefit from parallelism so make sure to set an appropriate MaxDegreeOfPrallelism value. When a block's delegate is purely CPU-intensive MaxDegreeOfPrallelism shouldn't be much higher than the available cores. As it has less CPU and more I/O-intensive parts the MaxDegreeOfPrallelism can be increased.


Using TPL dataflow throughout the application's lifetime is really simple. Just make sure to enable configuration through the app.config and tweak according to actual results "in the field".

This code won't compile because you're calling a non-static method from a static method without a class instance.

Once you fix that, you'll end up with infinite recursion.

On a typical JVM this would lead to the code eventually running out of stack space. On a JVM that optimizes tail recursion the code would be equivalent to an infinite loop.

First of all, this var obstacle = SKNode! will produce an error. You should declare an implicitly unwrapped optional like this:

 var obstacle:SKNode! 

About the main question (without analyzing the logic of what code actually does,)...You are passing an instance of SKNode class to +runBlock: method (which accepts a closure), thus the error. To fix this, you have to pass a closure, like this:

override func didMoveToView(view: SKView) {

            SKAction.runBlock({[unowned self] in self.rectangle()}),

In your case, a simpler way would be to remove the old animation action and replace it with a new one.


Message :
Login to Add Your Comments .
How to disable registered OpenCL platforms on Windows?
Is Observable broken in Angular 2 Beta 3?
Cross-thread operation not valid when using Invoke
How to pass an IEnumerable or queryable list of properties from Controller to View
Finding numbers after a certain keyword using Python
Pocketsphinx recognizes random phrases in a silence
Passing non-thread-safe objects through thread-safe containers
React scroll nav
BizTalk WCF-BasicHttp Adapter does not allow Empty string for Service Certificate Props
Why property ''cause" of Exception is repeating forever?
Privacy Policy 2017 © All Rights Reserved .