You are facing a connection breakdown. Does this happen in 3G, WiFi or “plain” connection on a computer?
Anyway, you must assume that the connection may be lost from time to time, when writing your app. For example, with mobiles, this happens frequently in the tube, in basements, etc. With PC apps, this is less frequent but occurs sometimes.
A retry can be a good solution. And a clean error message that explains the network is not available at this moment too.
Related Posts:
- C++ network programming
- How to create PPTP connection with Java?
- How to fix java.net.SocketException: Broken pipe?
- What’s causing my java.net.SocketException: Connection reset?
- Official reasons for “Software caused connection abort: socket write error”
- java.net.SocketException: Software caused connection abort: recv failed
- What is a StackOverflowError?
- What does “connection reset by peer” mean?
- What is the proper way to handle a NumberFormatException when it is expected?
- Exception in thread “main” java.util.NoSuchElementException
- How can I solve “java.lang.NoClassDefFoundError”?
- What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it?
- What could cause java.lang.reflect.InvocationTargetException?
- JavaFX – Exception in Application start method?
- What is AF_INET, and why do I need it?
- JavaFX – Exception in Application start method? [duplicate]
- C# An established connection was aborted by the software in your host machine
- Given final block not properly padded
- What is an AssertionError? In which case should I throw it from my own code?
- EOFException – how to handle?
- Can I catch multiple Java exceptions in the same catch clause?
- Exception in thread “main” java.util.NoSuchElementException: No line found
- java.net.MalformedURLException: no protocol
- Socket Programming in C++
- “NoClassDefFoundError: Could not initialize class” error
- unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown
- Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)
- Python [Errno 98] Address already in use
- “NoClassDefFoundError: Could not initialize class” error
- “NoClassDefFoundError: Could not initialize class” error
- Will setting a multicast destination address to FFFF.FFFF.FFFF make it a broadcast?
- Why do I get an UnsupportedOperationException when trying to remove an element from a List?
- Why do I get “Exception; must be caught or declared to be thrown” when I try to compile my Java code?
- Android – could not install *smartsocket* listener
- java.net.SocketTimeoutException: Read timed out under Tomcat
- Socket API or library for C++?
- What is difference between Errors and Exceptions?
- Causes of getting a java.lang.VerifyError
- How to create a custom exception type in Java?
- Python ConnectionRefusedError: [Errno 61] Connection refused
- java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES)
- java.net.SocketException: Connection reset
- What does socket binding mean?
- Cannot assign requested address using ServerSocket.socketBind
- Exception in thread “main” java.lang.ArithmeticException: / by zero
- Why is my method undefined for the type object?
- Java can’t find file when running through Eclipse
- FXML Load exception
- StringIndexOutOfBoundsException String index out of range: 0
- java.lang.ClassNotFoundException:com.mysql.jdbc.Driver [duplicate]
- Connection Java – MySQL : Public Key Retrieval is not allowed
- Why is a ConcurrentModificationException thrown and how to debug it
- Exception in thread “main” java.net.ConnectException: Connection refused: connect Socket Programming Java
- Throwing multiple exceptions in Java
- Java simple code: java.net.SocketException: Unexpected end of file from server
- java.lang.ArrayIndexOutOfBoundsException: 0
- Getting the IP address of the current machine using Java
- Handling a timeout error in python sockets
- How can I read a text file in Android?
- Exception is never thrown in body of corresponding try statement
- What is the meaning of “sin_addr.s_addr ” and “inet_addr”?
- How can I catch all the exceptions that will be thrown through reading and writing a file?
- javax vs java package
- Converting array to list in Java
- “Missing return statement” within if / for / while
- How to convert byte array to string and vice versa?
- good example of Javadoc
- Error when checking Java version: could not find java.dll
- Java Round up Any Number
- How do popBackStack() and replace() operations differ?
- Environment variable to control java.io.tmpdir?
- Java Undefined Object
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- How to convert an ArrayList containing Integers to primitive int array?
- Left Hand Side of an Assignment must be a Variable CharAt
- How to set or change the default Java (JDK) version on macOS?
- How can I create an array of linked lists in java?
- What’s the difference between session.persist() and session.save() in Hibernate?
- This view is not constrained
- Enhanced FOR loops in C++
- java.lang.NumberFormatException: null i
- How do you #include files in java?
- How to use Java in Visual Studio 2017
- List of Arrays in Java
- Why it is mandatory to use “throws IOException”
- Terminating a Java Program
- How to add an image to a JPanel?
- Can a normal Class implement multiple interfaces?
- How can I check if a value is of type Integer?
- Using regex to match any character except =
- How to sort a HashSet?
- Variable used in lambda expression should be final or effectively final
- Java printf formatting to print items in a table or columns
- How to resolve “Syntax error on token “else”” in Java?
- What’s the difference between Jetty and Netty?
- Is there a way to simulate the C++ ‘friend’ concept in Java?
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- Simple timeout in java
- Eclipse message saying List cannot be resolved to a type
- How to login into wordpress.com using HtmlUnit?