Let's start to implement error management :D

This code (clearly not enough tested) associate Ids with errors.