Handle Errors inside/outside class