Sh exception handling