Hello,

I've been working on a small vibe.d app and I'm wondering what the proper way to handle exceptions in a vibe.d application. I'm asking because I hit an error accessing fields in a std.json JSONValue object whenever the field doesn't exist. Before I created code to work around that (e.g. if it doesn't exist, provide a default value), whenever this would happen the server would crash and I get the following message "Error: Program exited with code -11". I tried putting a try/catch block in the function that the router uses, but for some reason the error/exception is not caught.

I would really like to know how to do this properly because I can't have the server crashing due to something stupid.

I don't know if this matters, but this is being done in the "response" portion of a requestHTTP call. I'm retrieving data from a RESTful data store before returning it semi-transformed to the requesting client.