pub fn enable_panic_on_overflow() 
Expand description

Enables the default panic-on-overflow behavior in the FuelVM.

Additional Information

Note:

panic-on-overflow is the default, so there is no need to use this function unless you have previously called disable_panic_on_overflow.

Examples

use std::flags::{disable_panic_on_overflow, enable_panic_on_overflow};

fn main() {
    disable_panic_on_overflow();

    // Adding 1 to the max value of a u64 is considered an overflow.
    let bar = u64::max() + 1;

    enable_panic_on_overflow();
}