Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Proposal for an exception-like mechanism

X-BeenThere: golang-nuts@googlegroups.com
Received: by 10.220.47.164 with SMTP id n36ls1604869vcf.1.p; Thu, 25 Mar 2010 
	13:08:41 -0700 (PDT)
Received: by 10.220.49.164 with SMTP id v36mr2785084vcf.13.1269547717448;
        Thu, 25 Mar 2010 13:08:37 -0700 (PDT)
Received: by 10.220.49.164 with SMTP id v36mr2785003vcf.13.1269547702794;
        Thu, 25 Mar 2010 13:08:22 -0700 (PDT)
Return-Path: <esko.luont...@gmail.com>
Received: from mail-gw0-f56.google.com (mail-gw0-f56.google.com [74.125.83.56])
        by gmr-mx.google.com with ESMTP id 29si282518vws.2.2010.03.25.13.08.21;
        Thu, 25 Mar 2010 13:08:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of esko.luont...@gmail.com designates 74.125.83.56 as permitted sender) client-ip=74.125.83.56;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of esko.luont...@gmail.com designates 74.125.83.56 as permitted sender) smtp.mail=esko.luont...@gmail.com
Received: by mail-gw0-f56.google.com with SMTP id a12so9178018gwa.1
        for <golang-nuts@googlegroups.com>; Thu, 25 Mar 2010 13:08:21 -0700 (PDT)
MIME-Version: 1.0
Received: by k19g2000yqn.googlegroups.com with HTTP; Thu, 25 Mar 2010 13:08:21 
	-0700 (PDT)
Date: Thu, 25 Mar 2010 13:08:21 -0700 (PDT)
In-Reply-To: <90ed5d0a1003251257mca5dbaew6c8015ee6ddddeb5@mail.gmail.com>
X-IP: 88.195.117.100
References: <0B0766DB-3DFB-455D-AE56-456B8DDE57E0@google.com> 
	<eb096917-e22d-42e1-83a5-4e5cf76661f8@j21g2000yqh.googlegroups.com> 
	<90ed5d0a1003251257mca5dbaew6c8015ee6ddddeb5@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) 
	AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1042 
	Safari/532.5,gzip(gfe),gzip(gfe)
Received: by 10.150.233.5 with SMTP id f5mr110070ybh.71.1269547701819; Thu, 25 
	Mar 2010 13:08:21 -0700 (PDT)
Message-ID: <bc12096a-943e-4641-8e50-9b7aefa0a549@k19g2000yqn.googlegroups.com>
Subject: Re: Proposal for an exception-like mechanism
From: Esko Luontola <esko.luont...@gmail.com>
To: golang-nuts <golang-nuts@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mar 25, 9:57=A0pm, Russ Cox <r...@golang.org> wrote:
> > Can I use runtime.Callers() and runtime.FuncForPC() to generate
> > exactly the same stack trace as would happen when the program
> > terminates?
>
> Almost. =A0Not quite, because you can't get at the argument values.
> But the argument values printed in the panic traces aren't useful
> anyway, unless you're comfortable reading the binary representation
> of the various data structures. =A0You can certainly make it look
> substantially similar. =A0The loss of the argument values is not such
> a big deal since they're not really readable as it is.
>
> I think it's safe to say that the interface to the active call stack
> is still evolving. =A0It's a little too ad hoc right now.
>
> > Where is the code that Go is currently using for
> > formatting the stack trace?
>
> src/pkg/runtime/amd64/traceback.c (even on 386)
>
> Russ

Thanks.

Also the exception proposal looks promising. :)