4 ms·
Does panic isolate gracefully a query-of-death, or does it take the entire server down? Does panic provide the stack-trace?
by pacala 13y ago
Does panic isolate gracefully a query-of-death, or does it take the entire server down?
Does panic provide the stack-trace?
- pjmlp 13y agoIf you don't use recover it takes the server down. http://blog.golang.org/2010/08/defer-panic-and-recover.html http://blog.golang.org/2010/08/defer-panic-and-recover.html http://code.google.com/p/go-wiki/wiki/PanicAndRecover http://code.google.com/p/go-wiki/wiki/PanicAndRecover
- EdiX 13y agoA panic unrolls the stack until it's recovered from. If it's not recovered the entire server will go down. If the panic isn't recovered it will print a stack trace, if it is recovered you can get a stack trace with runtime.Caller(). Go's panics are exceptions.
- pacala 13y agoThanks!