The problem may be due to various reasons from as simple as indigestion, constipation to some major causes also.
I hope you would have consulted a good doctor by now or your problem could have been cured.
However for general information I may suggest the following:
Vomiting is a way of the body emitting out unwanted material inside our stomach or something at throat and food pipe. (The black colour may be due to some decayed food item or can also be due to blood clot from some bleeding ulcer or injury inside at some place from throat to stomach and down).
If the problem is due to indigestion, you would be feeling lack of appetite, nausea, some kind of discomfort like bloating in stomach etc. You may drink some water and review how you feel. If there is no discomfort, and instead you feel more comfortable, continue it periodically reviewing the progress and comfort level.
After sometime, when you feel more comfortable, take a piece of ginger with jaggery and chew and swallow the juice. You may eat the fibre also if it is okay. Otherwise you can spit out the ginger fibre. Instead of plain water you may take mild warm Jeera water also. If the problem is indigestion or constipation, this may ease. In that continue light food like diluted warm milk, diluted salted buttermilk etc. for a day or until you feel normal.
If you have constant pain inside stomach or down inside, then there may be some ulcers or infection and it may need specific treatment by a doctor. In such cases taking honey in regulated quantity can help to soothe the discomfort. However anything may be repeated only if you feel comfortable and better after the first dose. Small Onion (shallots) fried in ghee (preferably cow ghee) are helpful in ulcers. The same may be mixed with a handful of cooked warm rice and eaten before the detailed meals. (It should be done only if ulcer is confirmed as the cause).
Anyway avoid spicy, fried and heavy food immediately and take only light, less spicy and less oily foods.