Package com.notnoop.exceptions

Examples of com.notnoop.exceptions.NetworkIOException


        return copy;
    }

    public static void wrapAndThrowAsRuntimeException(final Exception e) throws NetworkIOException {
        if (e instanceof IOException) {
            throw new NetworkIOException((IOException)e);
        } else if (e instanceof NetworkIOException) {
            throw (NetworkIOException)e;
        } else if (e instanceof RuntimeException) {
            throw (RuntimeException)e;
        } else {
View Full Code Here


                reconnectPolicy.reconnected();
                logger.debug("Made a new connection to APNS");
            } catch (IOException e) {
                logger.error("Couldn't connect to APNS server", e);
                throw new NetworkIOException(e);
            }
        }
        return socket;
    }
View Full Code Here

        return copy;
    }

    public static void wrapAndThrowAsRuntimeException(Exception e) throws NetworkIOException {
        if (e instanceof IOException)
            throw new NetworkIOException((IOException)e);
        else if (e instanceof NetworkIOException)
            throw (NetworkIOException)e;
        // unknown errors
        else if (e instanceof RuntimeException)
            throw (RuntimeException)e;
View Full Code Here

                }
                reconnectPolicy.reconnected();
                logger.debug("Made a new connection to APNS");
            } catch (IOException e) {
                logger.error("Couldn't connect to APNS server", e);
                throw new NetworkIOException(e);
            }
        }
        return socket;
    }
View Full Code Here

TOP

Related Classes of com.notnoop.exceptions.NetworkIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.