Throwing exception if given service is not implemented in class