[100496] trunk/dports/math/slepc/Portfile

Joshua Root jmr at macports.org
Tue Dec 18 11:11:33 PST 2012

On 2012-12-19 06:05 , Ryan Schmidt wrote:
> On Dec 18, 2012, at 13:03, Joshua Root wrote:
>> On 2012-12-19 05:51 , Ryan Schmidt wrote:
>>> It's confusing enough that we already have two equivalent ways to exit out of a portfile: "return -code error" which I think is what we prefer, and simply "error" which some portfile authors are using instead. We don't need yet a third way to do the same thing.
>> We don't define either of those, they're vanilla Tcl. The difference is
>> that "error" raises an error in the current context, while "return -code
>> error" raises it in the calling context (as though the caller had called
>> "error" in place of the procedure that is returning).
>> See "man n error", "man n return".
> And yet portfiles use them interchangeably. Which should we be using? Or does it matter?

For our purposes, it really only makes a difference to whether the last
call appears in the stack trace. Though "error" is shorter as well.

- Josh

More information about the macports-dev mailing list