I want to generate and handle exceptions (SEH).
How can I write a code that will lead to an "illegal instruction"-exception?
SEH Eceptions - generating and handling
378 views Asked by j12 At
2
There are 2 answers
2
On
You can raise a structured exception in Windows with:
RaiseException(EXCEPTION_ILLEGAL_INSTRUCTION, EXCEPTION_NONCONTINUABLE, 0, nullptr);
Reference:
https://msdn.microsoft.com/en-us/library/ms680552%28VS.85%29.aspx
You can do something like this: