The first question is, can an exhaust leak cause a rough idle? When you have a rough idle situation and it's being attributed to an exhaust leak, it is more likely that the reason for a rough idle caused the exhaust leak.
In order to understand this, it is important to know that a catalytic converter operates at a thousand degrees or more. If your engine develops a miss (which means one or more cylinders are not firing), it will result in a rough idle. If the reason for the miss is ignition or mechanical, there will still be raw gasoline exhausted into the exhaust system. As soon as this gasoline comes in contact with the high exhaust temperatures, it will ignite and burn in the exhaust manifolds, exhaust pipes and catalytic converter. Continued driving will cause these exhaust parts to glow red from the high heat. This is a serious problem because this can cause warpage or cracking of the exhaust manifolds resulting, in exhaust leaks. It can also burn holes in exhaust system components and destroy your vehicle's catalytic converter. And, of course, it can also be a fire hazard if the vehicle is parked over anything that is flammable.
It is extremely important that you not drive with an engine miss to avoid some very expensive repairs. The only way an exhaust leak can cause a rough idle is if the leak was in a place where it could enter the air intake system. In most cases the leaks are on the sides of the engine or in the rear of the engine where the exhaust manifolds attach to the engine, or the point where the exhaust pipes attach to the exhaust manifolds.
On some engines there is a pipe that takes exhaust gases from the exhaust system to the EGR valve. If a hole develops in this pipe leading to the EGR (Exhaust Gas Recirculation) Valve, it will not function as it was designed. EGR Valves allow burnt exhaust gases to reenter the intake manifold, causing a rich fuel condition by reducing the amount of oxygen. The rich fuel condition brings down the internal temperature of the engine cylinders ("rich" conditions are cooler, "lean" conditions are hotter). This, in turn, reduces the level of Oxides of Nitrogen (NOX) produced - a pollutant that is a key contributor to poor air quality. The most likely result of a nonfunctioning EGR Valve is a pinging or rattling sound caused by pre-ignition on acceleration, along with an illuminated check engine light found on the dash panel.
The last item is how an exhaust leak can affect fuel mileage and engine performance. Most vehicles on the road today are fuel injected. They have a computer and one or more oxygen sensors. The main purpose of the engine computer is related to emissions. It's always aiming to maintain an air fuel ratio of 14.7 to 1 for the gas leaving the exhaust manifolds. This is called the Stoichiometric Ratio - it is not the best for performance but is the ratio where the catalytic converter works best.
The oxygen sensors would be located in the exhaust manifolds or in the exhaust pipes right behind the manifolds. The main function of the oxygen sensors is to sample the exhaust to see how much oxygen is in the exhaust leaving the engine. High amounts of oxygen means the fuel is lean, resulting in higher cylinder temperatures. Low amounts of oxygen means the exhaust is rich and will result in lower cylinder temperatures. Oxygen sensors themselves are basically voltage generators producing from zero to one thousand millivolts. Any reading over 500 millivolts means the exhaust is rich and any reading below 500 millivolts is lean. The computer's job is to keep the voltage close to 500 millivolts, which is the reading it would get at the stoichiometric ratio of 14.7 to 1 mentioned earlier. The computer then adds or reduces fuel to maintain this 500 millivolt reading.
Here is where an exhaust leak can affect fuel mileage or engine performance. In order for an oxygen sensor to function properly, it samples outside oxygen and oxygen in the internal exhaust gases. There are small holes in the external part of the sensors where this sampling takes place. Anything like an exhaust leak or oil leak in the area of the oxygen sensor will prevent the sensors from sampling external oxygen properly, which results in the wrong readings to the computer. The computer must have accurate readings from the oxygen sensors to maintain the 14.7 to 1 fuel ratio. If the computer receives bad information, it is going to do bad things. This usually results in poor fuel economy and performance issues.
On a final note, oxygen sensors will not function until they reach a temperature of 500 degrees or more. Exhaust leaks can cause these oxygen sensors to not come up to this temperature. If there is no reading from the oxygen sensors the computer will operate on fixed values in its program called "Open Loop". These fixed values will result in the engine operating in a richer fuel condition and having a negative effect on fuel mileage. Your best mileage and performance will be achieved when oxygen sensors are functioning properly.