Client: catch la NumberFormatException #112

Closed
opened 5 years ago by louis_royer · 0 comments
Collaborator
Starting with TCP
Files present on the server:
0 : Exit the program
1 : PolySTRI_combacau.pdf
2 : test
Type the number associated with the file to download:
Exception in thread "client P2P-JAVA-PROJECT" java.lang.NumberFormatException: For input string: ""                                                   
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)                                                    
        at java.base/java.lang.Integer.parseInt(Integer.java:662)
        at java.base/java.lang.Integer.parseInt(Integer.java:770)
        at clientP2P.ClientManagement.run(ClientManagement.java:291)
        at java.base/java.lang.Thread.run(Thread.java:834)
```text Starting with TCP Files present on the server: 0 : Exit the program 1 : PolySTRI_combacau.pdf 2 : test Type the number associated with the file to download: Exception in thread "client P2P-JAVA-PROJECT" java.lang.NumberFormatException: For input string: "" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:662) at java.base/java.lang.Integer.parseInt(Integer.java:770) at clientP2P.ClientManagement.run(ClientManagement.java:291) at java.base/java.lang.Thread.run(Thread.java:834) ```
louis_royer added the
bug
easy
labels 5 years ago
louis_royer referenced this issue from a commit 5 years ago
louis_royer closed this issue 5 years ago
Sign in to join this conversation.
Loading…
There is no content yet.