Implement a small exception class to manage errors

Summary: Execption handling

Test Plan: need review

Reviewers: adrien

Reviewed By: adrien

Subscribers: NicolasDP

Differential Revision: http://91.121.199.76/D3