Shulchan Aruch, Orach Chayim Siman 172

Siman 172

Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.

א שָׁכַח וְהִכְנִיס מַשְׁקִין לְתוֹךְ פִּיו בְּלֹא בְּרָכָה, בּוֹלְעָן וְאֵינוֹ מְבָרֵךְ עֲלֵיהֶם בְּרָכָה רִאשׁוֹנָה. הַגָּה: וְיֵשׁ אוֹמְרִים דִּמְבָרֵךְ עֲלֵיהֶם, וְכֵן נִרְאֶה עִקָּר (הָרַשְׁבָּ"א בְּשֵׁם הָרַאֲבָ"ד וְהָרֹא"שׁ פֶּרֶק ג' שֶׁאָכְלוּ וְכֵן דִּבְרֵי הַרַמְבַּ"ם פ"ח מהל' בְּרָכוֹת).
1 One who drinks or eats without a blessing. Containing 2 paragraphs If one put a drink in their mouth without saying a blessing, they should swallow it and not say a first blessing (a before blessing). Rema: And there are those who say a blessing and so it seems is the core practice [Rashba, in the name of the Raavad, and the Rosh Chapter 3 and also Maimonides Chapter 8 laws of blessings]
ב שָׁכַח וְהִכְנִיס אֳכָלִין לְתוֹךְ פִּיו בְּלֹא בְּרָכָה, אִם הוּא דָּבָר שֶׁאֵינוֹ נִמְאָס אִם יִפְלְטֶנּוּ, יִפְלְטֶנּוּ וִיבָרֵךְ עָלָיו; וְאִם הוּא דָּבָר שֶׁנִּמְאָס, מְסַלְּקוֹ לְצַד אַחֵר וּמְבָרֵךְ.
2 If one put food in his mouth without reciting a beracha and it would not be repulsive to remove it he should spit it out and recite the beracha. If it would be repulsive he should move it to the side of his mouth and recite the beracha with the food in his mouth