On Mon, 28 Jul 2014 09:50:02 GMT, Drasha wrote:

Hi,

I have encountered two exceptions that give me a headache. First one in the "Reached EOF before reaching end marker" that appears when I do more than 6 parallel connections to a single page.

This is the exception:

object.Exception@../../.dub/packages/vibe-d-0.7.20/source/vibe/stream/operations.d(181): Reached EOF before reaching end marker.
(...)

and the associated code:
(...)

There is a ticket with the same error. Maybe the reason is that the server only accepts a maximum of 6 connections? It would definitely be good to implement a limit on the number of parallel connections for ConnectionPool anyway.

The second exception is "Task terminated with unhandled exception: Range violation". I am, however, not sure how I can catch this one. I've put try/catch around runTask and the function that is ran and nothing handled it.

You'd need to catch(Throwable ex), but then it should work. The alternative is to define "versions": ["VibeDebugCatchAll"] in the dub.json. This will cause vibe.d to catch any Throwable and log its contents instead of just killing the process.

Alternatively, you could load up the application in GDB and use break _d_throwc to see where the exception is thrown (assuming that there are not a lot of other exceptions).