git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4dc235a
)
Catch remote forking errors and display them
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 19 Nov 2013 17:16:12 +0000
(18:16 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 19 Nov 2013 17:16:12 +0000
(18:16 +0100)
www/fork-remote.php
patch
|
blob
|
history
diff --git
a/www/fork-remote.php
b/www/fork-remote.php
index f34a232ce8a5a0ec53ade08683b91c9d950edb16..4d9ca34f370a5167706bee930535ab792ffc894d 100644
(file)
--- a/
www/fork-remote.php
+++ b/
www/fork-remote.php
@@
-18,8
+18,12
@@
if (isset($_POST['remote_url'])) {
$fr->setUrl($_POST['orig_url']);
}
$forker = new Forker();
$fr->setUrl($_POST['orig_url']);
}
$forker = new Forker();
- $new = $forker->forkRemote($gitUrl, $fr->getUrl());
- redirect($new->getLink('display', null, true));
+ try {
+ $new = $forker->forkRemote($gitUrl, $fr->getUrl());
+ redirect($new->getLink('display', null, true));
+ } catch (\Exception $e) {
+ $error = $e->getMessage();
+ }
} else {
//multiple urls found
$urls = $fr->getGitUrls();
} else {
//multiple urls found
$urls = $fr->getGitUrls();