updated exception handling examples