0.4.0 - proper error classes

I'm updating the minor version, because this is breaking
backwards compatibility.