The above function is a Discontinuity function. A Discontinuity function is one which is removable as x tends towards an integer 'a'.
Thus in the circled region, as shown in the image below, as the function tends to -4 in either direction (left or right), the limit of the function is 2.