combined different exception handling