e.printStackTrace() as JSON

Sometimes you don’t want to hide the stacktrace

Let’s suppose that you have an Interlok instance servicing HTTP requests and the data being transferred around is JSON messages. In the event that an exception happens what would normally happen is an exception is printed in the log file and a HTTP 500 error returned back to the client. What if we want to send more information such as the stack trace back to the caller as a JSON message.

Continue reading e.printStackTrace() as JSON

Using Exceptions for Flow Control

GOTOs are back, or perhaps they never went away.

If you search for the phrase “exceptions as flow control” then most of the top hits are about how bad it is and how you shouldn’t. I don’t disagree with that point, exceptions should be unexpected, so you shouldn’t really be treating them as an expectation. Put it another way, exceptions are, in essence, GOTO statements; everyone knows that GOTOs are bad.

Continue reading Using Exceptions for Flow Control

Virtualbox isn't the only tool in the box

Running HPCC systems Virtualbox image under Hyper-V

Now that I don’t have VirtualBox installed, I have to migrate my HPCC Systems environment into Hyper-V; this was a brief flurry of amusement, but in the end I have a HPCC system running under Hyper-V with minimal fuss. Along the way I have discovered something new about the virtual box environment that HPCC Systems makes available for download.

Continue reading Virtualbox isn't the only tool in the box

Vagrant + Hyper-V (Windows 10 anniversary)

Making Vagrant play nicely with Hyper-V; that can be a bit of a ballache

Well, my personal laptop has been upgraded to Windows 10 Anniversary; it’s a dual SSD + HD affair, an Asus NX501-JW which hasn’t been affected by the other “SSD+HD” bricking issues that have been in the tech news. Anyway, either I, or Microsoft during the upgrade, uninstalled Virtualbox, which I had been using to run an HPCC Systems environment amongst other things. In the end, the chance to run Docker natively, and Linux shell natively via Hyper-V persuaded me that I should try and get Vagrant to play nice to Hyper-V; this then is an afternoon of fun and games.

Continue reading Vagrant + Hyper-V (Windows 10 anniversary)

Liberté, égalité, and French Gin

Citadelle: it’s a French gin; goes well with both lemons or lime. Apparently it’s just your preference; you are free to choose. The choice here is liberating when it comes to gin; in the UK we may not be used to having the freedom to choose your path. You’re restricted by class, restricted by your family, restricted by your own outlook on life.

Continue reading Liberté, égalité, and French Gin


©. All rights reserved.

Powered by Hydejack v6.6.1