As I recall, in the Pāli Canon, the Buddha gives a discourse in which he says something like “there are several wrong ways to ask a question” and one of those wrong intents behind question-posing is “posing a question with the intent to ensnare the answerer”, as best I can remember it.
Does anyone have any idea what I might be remembering?