#[before_handle_exception]
Expand description

(Callback) Called just before we are about to handle an exception.

Callback ID:     PANDA_CB_BEFORE_HANDLE_EXCEPTION 

   Note: only called for cpu->exception_index > 0

   Aguments:
     exception_index (the current exception number)

   Return value:
     a new exception_index.

   Note: There might be more than one callback for this location.
   First callback that returns an exception index that *differs*
   from the one passed as an arg wins. That is what we return as
   the new exception index, which will replace
   cpu->exception_index

Callback arguments: (&mut CPUState, i32, )

Example

use panda::prelude::*;

#[panda::before_handle_exception]
fn callback(_: &mut CPUState, _: i32, ) -> i32 {
    // do stuff
}