package org.opendaylight.controller.protocol_plugin.openflow.core.internal;
-import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
handleMessages();
}
}
- } catch (IOException e) {
- logger.error("Caught I/O Exception: " + e.toString());
- e.printStackTrace();
+ } catch (Exception e) {
+ reportError(e);
}
}
}
this.clientSelectionKey.cancel();
this.socket.close();
executor.shutdown();
- } catch (IOException e) {
- logger.error("Caught IOException in stop()");
+ } catch (Exception e) {
+ // do nothing since we are shutting down.
+ return;
}
}
this.selector, SelectionKey.OP_WRITE, this);
}
logger.trace("Message sent: " + msg.toString());
- } catch (IOException e) {
+ } catch (Exception e) {
reportError(e);
}
}
this.clientSelectionKey = this.socket.register(
this.selector, SelectionKey.OP_READ, this);
}
- } catch (IOException e) {
+ } catch (Exception e) {
reportError(e);
}
}
int bytesRead;
try {
bytesRead = socket.read(inBuffer);
- } catch (IOException e) {
+ } catch (Exception e) {
reportError(e);
return null;
}