Catch connection lost exception when intended