I got the same problem and I printed the string and the integer on the same line by moving the cursor like this :
lcd.setCursor(0, 0); <----------Column 0 , Line 1
lcd.print("This code failed");
lcd.setCursor(0, 1); <----------Column 0 , Line 2
lcd.print("Error Code = ");
lcd.setCursor(13, 1); <----------- change the cursor for the INT. Column 13 , Line 2
lcd.print(int);