Revise exception handling