Improve the error infrastructure. Hopefully this works; I haven't