make it more clear we're moving into panic mode
This commit is contained in:
@@ -4,7 +4,11 @@ func divideFourBy(i int) int {
|
||||
return 4 / i
|
||||
}
|
||||
|
||||
const __divisor__ = 0
|
||||
|
||||
func aboutPanics() {
|
||||
n := divideFourBy(0)
|
||||
assert(__delete_me__) // panics are exceptional errors at runtime
|
||||
|
||||
n := divideFourBy(__divisor__)
|
||||
assert(n == 2) // panics are exceptional errors at runtime
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user