Adds Exception handler

Create funtions to manipulate errors for custom apps