main.m exception handling