event listener for exceptions implemented

Generic exception handler implemented.

Output example;
{
    "success" : false,
    "error" : {
        "message" : "Event not found",
        "code":0
     }
}