Consolidating the method exception extraction logic