[FEATURE REQUEST] Please take out static CallCount from FOutputDeviceError::HandleError()

There are different situations when application stops by check/checkf assetion failure.

But I don’t want stop my game! I want to send crash report and continue as if nothing had happened.

In the FOutputDeviceWindowsError::HandleError() there are delegates calls such as FCoreDelegates::OnHandleSystemError and FCoreDelegates::OnShutdownAfterError which can be used for raising exceptions and catched in my upper level code.

But one variable named CallCount is static local for this function and this trick works only once!

Dear Epics! Please move out this variable from this method as GHandleErrorCallCount and give free to edit this. Or create the new boolean global for control this case.

Thanks!

Hi,

check() is designed to be fatal. A check() failure means that the engine has found itself in an unexpected state and the only reasonable course of action is to report an error and terminate the program. It is not reasonable to handle these exceptions and continue executing.

If this is for handling check()s in own code, perhaps you could consider using ensure(), which reports an error but allows you to test the result and handle it appropriately:

void Func()
{
    UObject* Result = StartDoingSomeStuff();
    if (!ensure(Result != null))
    {
        UE_LOG(MyLog, Error, TEXT("Unexpected null pointer passed to Func"));
        RevertStuff();
        return;
    }

    Ptr->FinishStuff();
}

Hope this helps,

Steve