Start handling exceptions in socket