On Tue, Oct 9, 2018 at 11:49 AM, jclc via golang-nuts
<golang-nuts@googlegroups.com> wrote:
> I'm trying to make a graphical crash window on my program for my users who
> will not have terminal access. I can panic with my own custom crash dumps
> that include details that I can then handle after recover(), but I can't get
> anything useful from a standard library panic. If the user tells me his
> program crashes with "nil pointer dereference" or "index out of range",
> that's not going to be very useful. I can't even redirect the stack trace
> into a file by omitting recover(). If the runtime can print a stacktrace
> from where a panic occurred, is there really no way to get it and handle it
> yourself?

If you call recover, you can get a stack trace.  The deferred function
that calls recover runs in the stack that calls panic.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to