added custom exception for undefined env variables

cc // @pewniak747 @bartoszkopinski