Hope im right but it might be you walked him too far. Its to do with their breathig issues and over heating. Because u say it was like foam it sounds like where he was breathing heavily the saliva gathered up making him vomit. Try not to walk so far and walk him slowly EBs dont need very long walks especially if its hot weather as they over heat easily.
Keep lemon juice (the ones in the yellow lemon shaped bottles not sure of the make) with you because when the saliva gathers like that it can become serious and dangerous blocking their air ways. If you squirt a bit of lemon juice it separates all the saliva helpig your bully to breathe a bit better. Also dont feed him when hes like this as it makes the vomiting worse and do not let him over drink water as it can make him vomit more. Make him lay down calm keep him cool and make sure he can breathe easily (using lemon juice if needed) & keep a close eye on him until he calms down and breathing is back to normal xxx