Skip to content

Commit

Permalink
Better error report.
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Oct 30, 2018
1 parent 21d5e5b commit 25242c6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ basicExecute
headRemote: remote)
setModal: true;
onAccept: [ :pullRequest |
[ | pullRequestDatas |
[ | pullRequestDatas url |
pullRequestDatas := pullRequest send.
url := pullRequestDatas at: 'html_url'.
UIManager default
inform: 'Pull request created. Click to view on Github.'
actionOnClick: [ self class environment at: #WebBrowser ifPresent: [ :webBrowser | webBrowser openOn: (pullRequestDatas at: 'html_url') ] ifAbsent: [ self inform: 'Feature not available in Pharo 6' ] ] ]
actionOnClick: [ self class environment at: #WebBrowser ifPresent: [ :webBrowser | webBrowser openOn: url ] ifAbsent: [ self inform: ('Cannot open "{1}" because the project WebBrowser is not present by default in Pharo 6.' format: { url }) ] ] ]
on: IceGitHubError
do: [ :e | self reportError: e ] ];
openWithSpec

0 comments on commit 25242c6

Please sign in to comment.