4 ms·
Assuming it's not a division by constant zero that's caught at compile time, it panics. Go's panic/recover system seems conceptually similar to try/catch and e
by tomku 13y ago
Assuming it's not a division by constant zero that's caught at compile time, it panics. Go's panic/recover system seems conceptually similar to try/catch and exceptions, but they aren't a drop-in replacement for exceptions due to some differences in both style and execution. There's a good blog post[1] on the Go blog going into more detail about defer/panic/recover, if you're interested.
[1]: http://blog.golang.org/defer-panic-and-recover http://blog.golang.org/defer-panic-and-recover