DataTable::FindRow warning with missing row is showing the wrong information

Build Type: Source

Build Version: 0

Detailed Description of the Issue: When finding a missing row in a DataTable using FindRow, the UE_LOG message is incorrect.

The ‘requested row’ is the data table name, and the ‘data table’ is the ‘path name’.

This is mildly confusing!

The issue is on this line:

UE_LOG(LogDataTable, Warning, TEXT("UDataTable::FindRow : '%s' requested row '%s' not in DataTable '%s'."), *ContextString, *GetPathName(), *RowName.ToString());

In this file:

Engine/Source/Runtime/Engine/Classes/Engine/DataTable.h

Repro steps:

  1. Create an empty data table structure in C++.
  2. Create an instance of your data table structure and store it as a UDataTable* type
  3. Call the FindRow template with your type and use any invalid string as the row name - make sure bWarnIfRowMissing is true
  4. Observe log output

Hi ,

I was just getting ready to start looking into this, and decided to take a look at the line of code that you had mentioned first. In the version of the Master branch that I pulled down today, it looks like this may have already been corrected. The line of code now reads:

UE_LOG(LogDataTable, Warning, TEXT("UDataTable::FindRow : '%s' requested row '%s' not in DataTable '%s'."), *ContextString, *RowName.ToString(), *GetPathName());

Does this better match the output you are expecting to see?

Hi

Thanks for your reply - it would now match what I was expecting.

I missed this commit from Nov 30th 2016 from the Fortnight Staging: https://github.com/EpicGames/UnrealEngine/commit/33f0f0a6e6ae65362da7f8947562c0395cae0441#diff-dc9ad742925da61632a1c13f809c7a16

It appears to have been fixed by this commit:

Change 3195272 on 2016/11/11 by Bob.Tellez

fortnite Fix warning output in UDataTable for missing row

Thanks again.