Added util method to throw any kind of exception