diff options
author | James Moger <james.moger@gitblit.com> | 2011-04-27 21:56:56 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-04-27 21:56:56 -0400 |
commit | 166e6a131d0693d20b3cc08f252705608d24d5f0 (patch) | |
tree | e4465e770f862b56080081dd62f7d28e80dd8bf9 /src/com/gitblit/wicket/pages/EditRepositoryPage.java | |
parent | f97bf09263fe8ef7ba4dcf231dfe7b8265b1e0df (diff) | |
download | gitblit-166e6a131d0693d20b3cc08f252705608d24d5f0.tar.gz gitblit-166e6a131d0693d20b3cc08f252705608d24d5f0.zip |
Improve repo folder detection. Fail gracefully on create repo error.
Diffstat (limited to 'src/com/gitblit/wicket/pages/EditRepositoryPage.java')
-rw-r--r-- | src/com/gitblit/wicket/pages/EditRepositoryPage.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/com/gitblit/wicket/pages/EditRepositoryPage.java index 6201b22b..45fe9e2e 100644 --- a/src/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -9,6 +9,7 @@ import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.CompoundPropertyModel;
import com.gitblit.GitBlit;
+import com.gitblit.GitBlitException;
import com.gitblit.wicket.AdminPage;
import com.gitblit.wicket.BasePage;
import com.gitblit.wicket.WicketUtils;
@@ -48,7 +49,12 @@ public class EditRepositoryPage extends BasePage { @Override
protected void onSubmit() {
- GitBlit.self().editRepositoryModel(repositoryModel, isCreate);
+ try {
+ GitBlit.self().editRepositoryModel(repositoryModel, isCreate);
+ } catch (GitBlitException e) {
+ error(e.getMessage());
+ return;
+ }
setRedirect(true);
setResponsePage(RepositoriesPage.class);
}
|