if (hasCommands()) {
readPostCommands(pck);
}
- } catch (PackProtocolException e) {
- discardCommands();
- fatalError(e.getMessage());
- throw e;
- } catch (InputOverLimitIOException e) {
- String msg = JGitText.get().tooManyCommands;
+ } catch (Throwable t) {
discardCommands();
- fatalError(msg);
- throw new PackProtocolException(msg);
+ throw t;
}
}
getAdvertisedOrDefaultRefs();
if (hasError())
return;
- recvCommands();
+
+ try {
+ recvCommands();
+ } catch (PackProtocolException e) {
+ fatalError(e.getMessage());
+ throw e;
+ } catch (InputOverLimitIOException e) {
+ String msg = JGitText.get().tooManyCommands;
+ fatalError(msg);
+ throw new PackProtocolException(msg);
+ }
+
if (hasCommands()) {
Throwable unpackError = null;
if (needPack()) {