|
| ▲ | sunrunner 3 days ago | parent | next [-] |
| This is a really good point and a common error in bit flip detection code. To avoid this kind of look-before-you-leap hazard the following is recommended: try {
do_action()
} catch (BitFlipError e) {
logger.critical("Shouldn't get here")
}
Ask-for-forgiveness as an error detection pattern avoids these kinds of errors entirely. |
|
| ▲ | terminalshort 3 days ago | parent | prev | next [-] |
| Simple! Make it an int. int cosmic_ray = 0
if (bool(cosmic_ray)) {
throw cosmicRayException()
}
|
|
| ▲ | wavemode 3 days ago | parent | prev [-] |
| ah, a classic TORTOF bug (time-of-ray, time-of-flip) |