While exercising my new driver, I got a BSOD which said "unexpected kernel mode trap."
I didn't get a crash dump, and I've since set my system options to create one, so if this happens again, I should be able to analyze the dump file. Since it's most likely in my kernel mode driver, I assume that a kernel dump will be sufficient (anyone disagree?).
However, even if I find where my driver code was causing the crash, I'd like to do better than that.
Can someone tell me if there's a way to intercept any bugchecks, etc., so that I can gracefully exit the driver routine that is running? Something like registering a bugcheck hook function, or a __try / __except construct or C++ try block?