Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] java.io.IOException: Read error at (FS.java:289)

I am unable to catch the “Read Error” using a try - catch block because it is not an IOException that is being thrown, but is the result of a debug statement in FS.java!

 

Please take a look at the following lines – Am I missing something? Is there a way to suppress this error?

 

                                                try {

                                                          int ch;

                                                          if (debug)

                                                                   while ((ch = is.read()) != -1)

                                                                             System.err.print((char) ch);

                                                          else

                             Line 289:                        while (is.read() != -1) {

                                                                             // ignore

                                                                   }

                                                } catch (IOException e) {

                                                          // Just print on stderr for debugging

                                                          e.printStackTrace(System.err);

                                                          gooblerFail.set(true);

                                                }

                                                try {

                                                          is.close();

                                                } catch (IOException e) {

                                                          // Just print on stderr for debugging

                                                          e.printStackTrace(System.err);

                                                          gooblerFail.set(true);

                                                }

 

From: Alam, Prathibha
Sent: Friday, August 26, 2011 11:50 AM
To: 'jgit-dev@xxxxxxxxxxx'
Subject: java.io.IOException: Read error at (FS.java:289)

 

Hi,

 

A read error is thrown every time I do a Git clone with a few lines of code like this.

 

CloneCommand cc = Git.cloneRepository();

                            

                             cc.setURI(url.toString());

                             cc.setDirectory(directory);

                             cc.setBranch("refs/heads/"+branch);

                             cc.setBare(false);

                             cc.setCloneAllBranches(false);

                             Git git = null;

                             git = cc.call();

 

java.io.IOException: Read error

          at java.io.FileDescriptor.read(FileDescriptor.java:83)

          at java.io.FileInputStream.read(FileInputStream.java:177)

          at org.eclipse.jgit.util.FS$2.run(FS.java:289)

 

How do I deal with this?

 

-prathibha


Back to the top