Custom exceptions

Adds custom exceptions when you do not have the required privileges. There is a global catch but it can be specified at controller level as wel at function level