Added query into exception message.