[Windows] Handle crashes without exception (#912)
* Handle that exception_pointers can be null * Fix formatting * windows: Handle crashes without exception
This commit is contained in:
parent
f9eac18542
commit
2f9b279428
@ -1294,20 +1294,22 @@ mod windows_exception_handler {
|
||||
compiler_fence(Ordering::SeqCst);
|
||||
}
|
||||
|
||||
let code = ExceptionCode::try_from(
|
||||
exception_pointers
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.ExceptionRecord
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.ExceptionCode
|
||||
.0,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
eprintln!("Crashed with {}", code);
|
||||
if let Some(exception_pointers) = exception_pointers.as_mut() {
|
||||
let code = ExceptionCode::try_from(
|
||||
exception_pointers
|
||||
.ExceptionRecord
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.ExceptionCode
|
||||
.0,
|
||||
)
|
||||
.unwrap();
|
||||
eprintln!("Crashed with {}", code);
|
||||
} else {
|
||||
eprintln!("Crashed without exception (probably due to SIGABRT)");
|
||||
};
|
||||
|
||||
if data.current_input_ptr.is_null() {
|
||||
#[cfg(feature = "std")]
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user