You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fixed highlighted line in DXC error message.
#rb none #jira UE-83064 #rnx #ROBOMERGE-SOURCE: CL 10271524 in //UE4/Release-4.24/... #ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v591-10236483) [CL 10271528 by lukas hermanns in Main branch]
This commit is contained in:
@@ -774,6 +774,21 @@ struct FShaderCompilerError
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the error message with source file and source line (if present), as well as a line marker seperated with a LINE_TERMINATOR. */
|
||||
FString GetErrorStringWithLineMarker() const
|
||||
{
|
||||
if (HasLineMarker())
|
||||
{
|
||||
// Append highlighted line and its marker to the same error message with line terminators
|
||||
// to get a similar multiline error output as with DXC
|
||||
return (GetErrorString() + LINE_TERMINATOR + TEXT("\t") + HighlightedLine + LINE_TERMINATOR + TEXT("\t") + HighlightedLineMarker);
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetErrorString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Returns true if this error message has a marker string for the highlighted source line where the error occurred. Example:
|
||||
/Engine/Private/MySourceFile.usf(120): error: undeclared identifier 'a'
|
||||
@@ -790,7 +805,7 @@ struct FShaderCompilerError
|
||||
|
||||
friend FArchive& operator<<(FArchive& Ar,FShaderCompilerError& Error)
|
||||
{
|
||||
return Ar << Error.ErrorVirtualFilePath << Error.ErrorLineString << Error.StrippedErrorMessage;
|
||||
return Ar << Error.ErrorVirtualFilePath << Error.ErrorLineString << Error.StrippedErrorMessage << Error.HighlightedLine << Error.HighlightedLineMarker;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user