Adding first version of custom exceptions

Since now, only generic exception was accepted. This commit add support to exceptions identified by an ID. This ID cannot be 0.