I believe I have what's called a peptic or dupdenal ulcer which occurs in the upper (small) intestine, just below the stomach. I do indeed get some discomfort when my stomach is empty, so I drink a lot of water, and when I can, fruit and vegitable juice (cabbage juice being recommended, from what I've read). Grape juice seems to have the most pleasant effect for some reason. I've never had nausea or vomitting, nor any bleeding. Indeed the onion/carrots/cucumber main meal raw salad, caused my henria (intestines) to bloat/swell up considerably, and only laying down seem to help relax my digestion enough to minimize the pain. Otherwise, I've not had any other problems, except once when I indeed did have to vomit and had naseu a few years ago, which seemed like my stomach/intestines was trying to get rid of something, which took several hours to alleviate, whatever it was. Fortunately that has never re-occurred.
About all I can tell you is I have an umbilical hernia, which happened when my abdomen had swolled up and I coughed a lot, and apparently it tore some little muscles in the area of my belly button. It hurt pretty bad for a few weeks, and then went away. My gastro guy told me what it was called. I think the large intestine goes right above there, and so sometimes when I get gas or get too full, it sort of feels hard there, until I can pass waste. But I haven't had any pain from it since it happened over a year ago.
Onions are actually good for the digestion, so maybe that with the fiberous carrots, and cukes, which can cause a little gas, just swelled up your bowel and made it hurt there, I don't know. But that was a good thing you ate, actually. Probably just gas was hurting. You should eat foods that have fiber in them on a regular basis, to keep your digestion regular, along with plenty of water and exercise. Maybe that will take the pressure off your hernia. And if a hernia really bothers a person, it can be operated on.