I have just tested with the code change above on Mac OS X and it's ok (no need for the try-catch clause when using `||`).
When opening a Go project it show the warning message about the missing GOROOT or GOPATH env variable.
And for info, then i have added the following line to my `.profile`file :
<pre>
launchctl setenv GOPATH $GOPATH
launchctl setenv GOROOT $GOROOT
</pre>
and than no more message after this change. (I have done also a `source .profile` of course).

So i think you can use `||` and remove the try-catch clause.

![env missing](https://f.cloud.github.com/assets/1123632/1820425/d382774e-70e8-11e3-8ae6-6e6cb6013d49.png)