Refined exception handling