Exception handling in the network code