Browse Source

Include the number of ms in timeout error message

Noticed that while analyzing bug 402131.

Change-Id: If3fd40b64d5088c4579946271a67346cbd9e6556
stable-3.0
Robin Stocker 12 years ago
parent
commit
3ee04e3531
  1. 4
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
  2. 7
      org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java
  3. 7
      org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java

4
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

@ -385,7 +385,7 @@ pushIsNotSupportedForBundleTransport=Push is not supported for bundle transport
pushNotPermitted=push not permitted pushNotPermitted=push not permitted
rawLogMessageDoesNotParseAsLogEntry=Raw log message does not parse as log entry rawLogMessageDoesNotParseAsLogEntry=Raw log message does not parse as log entry
readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0} readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0}
readTimedOut=Read timed out readTimedOut=Read timed out after {0} ms
receivePackObjectTooLarge1=Object too large, rejecting the pack. Max object size limit is {0} bytes. receivePackObjectTooLarge1=Object too large, rejecting the pack. Max object size limit is {0} bytes.
receivePackObjectTooLarge2=Object too large ({0} bytes), rejecting the pack. Max object size limit is {1} bytes. receivePackObjectTooLarge2=Object too large ({0} bytes), rejecting the pack. Max object size limit is {1} bytes.
receivingObjects=Receiving objects receivingObjects=Receiving objects
@ -541,7 +541,7 @@ weeksAgo={0} weeks ago
windowSizeMustBeLesserThanLimit=Window size must be < limit windowSizeMustBeLesserThanLimit=Window size must be < limit
windowSizeMustBePowerOf2=Window size must be power of 2 windowSizeMustBePowerOf2=Window size must be power of 2
writerAlreadyInitialized=Writer already initialized writerAlreadyInitialized=Writer already initialized
writeTimedOut=Write timed out writeTimedOut=Write timed out after {0} ms
writingNotPermitted=Writing not permitted writingNotPermitted=Writing not permitted
writingNotSupported=Writing {0} not supported. writingNotSupported=Writing {0} not supported.
writingObjects=Writing objects writingObjects=Writing objects

7
org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2009, Google Inc. * Copyright (C) 2009, 2013 Google Inc.
* and other copyright owners as documented in the project's IP log. * and other copyright owners as documented in the project's IP log.
* *
* This program and the accompanying materials are made available * This program and the accompanying materials are made available
@ -137,7 +137,8 @@ public class TimeoutInputStream extends FilterInputStream {
myTimer.end(); myTimer.end();
} }
private static InterruptedIOException readTimedOut() { private InterruptedIOException readTimedOut() {
return new InterruptedIOException(JGitText.get().readTimedOut); return new InterruptedIOException(MessageFormat.format(
JGitText.get().readTimedOut, Integer.valueOf(timeout)));
} }
} }

7
org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2009, Google Inc. * Copyright (C) 2009, 2013 Google Inc.
* and other copyright owners as documented in the project's IP log. * and other copyright owners as documented in the project's IP log.
* *
* This program and the accompanying materials are made available * This program and the accompanying materials are made available
@ -150,7 +150,8 @@ public class TimeoutOutputStream extends OutputStream {
myTimer.end(); myTimer.end();
} }
private static InterruptedIOException writeTimedOut() { private InterruptedIOException writeTimedOut() {
return new InterruptedIOException(JGitText.get().writeTimedOut); return new InterruptedIOException(MessageFormat.format(
JGitText.get().writeTimedOut, Integer.valueOf(timeout)));
} }
} }

Loading…
Cancel
Save