Added example with exceptions