1 /* $Id: exception.c,v 1.7 2001/09/24 00:51:16 chorns Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * PURPOSE: User-mode exception support
6 * FILE: lib/ntdll/rtl/exception.c
7 * PROGRAMER: David Welch <welch@cwcom.net>
10 /* INCLUDES *****************************************************************/
12 #include <ddk/ntddk.h>
16 /* FUNCTIONS ***************************************************************/
19 RtlRaiseException(PEXCEPTION_RECORD ExceptionRecord
)
24 RtlDispatchException(PEXCEPTION_RECORD ExceptionRecord
,
31 KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord
,
34 EXCEPTION_RECORD NestedExceptionRecord
;
37 if (RtlDispatchException(ExceptionRecord
, Context
) == 1)
39 Status
= ZwContinue(Context
, FALSE
);
43 Status
= ZwRaiseException(ExceptionRecord
, Context
, FALSE
);
46 NestedExceptionRecord
.ExceptionCode
= Status
;
47 NestedExceptionRecord
.ExceptionFlags
= EXCEPTION_NONCONTINUABLE
;
48 NestedExceptionRecord
.ExceptionRecord
= ExceptionRecord
;
50 RtlRaiseException(&NestedExceptionRecord
);
54 RtlRaiseStatus(NTSTATUS Status
)
56 EXCEPTION_RECORD ExceptionRecord
;
58 ExceptionRecord
.ExceptionCode
= Status
;
59 ExceptionRecord
.ExceptionRecord
= NULL
;
60 ExceptionRecord
.NumberParameters
= 0;
61 ExceptionRecord
.ExceptionFlags
= EXCEPTION_NONCONTINUABLE
;
62 RtlRaiseException (& ExceptionRecord
);
67 RtlUnwind(PEXCEPTION_REGISTRATION RegistrationFrame
,
69 PEXCEPTION_RECORD ExceptionRecord
,