Drivers.ExceptionMethods.HandleException()

Here are the examples of the csharp api class Drivers.ExceptionMethods.HandleException() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: FlingOS
Source File: ExceptionMethods.cs
[NoDebug]
        [NoGC]
        public static void Throw(Exception ex)
        {
            GC.IncrementRefCount(ex);

            //BasicConsole.WriteLine("Exception thrown:");
            //BasicConsole.WriteLine(ex.Message);

            if (State->CurrentHandlerPtr->Ex != null)
            {
                //GC ref count remains consistent because the Ex pointer below is going to be replaced but
                //  same pointer stored in InnerException.
                // Result is ref count goes: +1 here, -1 below
                ex.InnerException = (Exception)ObjectUtilities.GetObject(State->CurrentHandlerPtr->Ex);
            }
            if (ex.InstructionAddress == 0)
            {
                ex.InstructionAddress = *((uint*)BasePointer + 1);
            }
            State->CurrentHandlerPtr->Ex = ObjectUtilities.GetHandle(ex);
            State->CurrentHandlerPtr->ExPending = 1;

            HandleException();

            // We never expect to get here...
            HaltReason = "HandleException returned!";
            BasicConsole.WriteLine(HaltReason);
            // Try to cause fault
            *(byte*)0x800000000 = 0;
        }

2. Example

Project: FlingOS
Source File: ExceptionMethods.cs
[ExceptionsHandleEndFinallyMethod]
        [NoDebug]
        [NoGC]
        public static void Handl/n ..... /n //View Source file for more details /n }