Exception handling using domains