Misleading example. A transaction is always rolled back when an exception is thrown. This should also be stated in the paragraph above.