org.eclipse.jgit.nls;version="[4.7.0,4.8.0)",
org.eclipse.jgit.transport.http;version="[4.7.0,4.8.0)",
org.eclipse.jgit.transport.http.apache;version="[4.7.0,4.8.0)",
- org.eclipse.jgit.util;version="[4.7.0,4.8.0)"
+ org.eclipse.jgit.util;version="[4.7.0,4.8.0)",
+ org.slf4j;version="[1.7.0,2.0.0)"
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
+import java.text.MessageFormat;
import java.util.List;
import javax.servlet.ServletException;
import org.eclipse.jgit.lfs.errors.LfsUnauthorized;
import org.eclipse.jgit.lfs.errors.LfsUnavailable;
import org.eclipse.jgit.lfs.errors.LfsValidationError;
+import org.eclipse.jgit.lfs.internal.LfsText;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
* @since 4.3
*/
public abstract class LfsProtocolServlet extends HttpServlet {
+ private static Logger LOG = LoggerFactory
+ .getLogger(LfsProtocolServlet.class);
private static final long serialVersionUID = 1L;
try {
repo = getLargeFileRepository(request, path);
if (repo == null) {
- throw new LfsException("unexpected error"); //$NON-NLS-1$
+ String error = MessageFormat
+ .format(LfsText.get().lfsFailedToGetRepository, path);
+ LOG.error(error);
+ throw new LfsException(error);
}
res.setStatus(SC_OK);
TransferHandler handler = TransferHandler