Uniformise exceptions

The idea is to make the exceptions parseable when catched programmatically.