Intercept the error line number and calculate the actual line number using an offset.