improve controller error management
Merge pull request #215 from poupotte/master

Improve controller error management