Set exception code in flash params.
Merge pull request #3968 from ADmad/3.0-flash

Set exception code in flash params.