A few more error reporting improvements
This commit is contained in:
@@ -94,6 +94,7 @@ void WingFetcher::PathFailed(const TCHAR* Expected)
|
||||
UWingServer::Printf(TEXT("ERROR: Path specifies a %s, but expected %s\n"), *Obj->GetClass()->GetName(), Expected);
|
||||
else
|
||||
UWingServer::Printf(TEXT("ERROR: Path led to a null pointer\n"));
|
||||
PrintPathExplanation();
|
||||
SetError();
|
||||
}
|
||||
|
||||
@@ -105,6 +106,7 @@ WingFetcher& WingFetcher::TypeMismatch(const TCHAR* Walker, const TCHAR* Expecte
|
||||
UWingServer::Printf(TEXT("ERROR: Input to '%s' is %s, but expected %s\n"), Walker, *Obj->GetClass()->GetName(), Expected);
|
||||
else
|
||||
UWingServer::Printf(TEXT("ERROR: Path led to a null pointer\n"));
|
||||
PrintPathExplanation();
|
||||
SetError();
|
||||
return *this;
|
||||
}
|
||||
@@ -239,7 +241,6 @@ WingFetcher& WingFetcher::Graph(const FString& Value)
|
||||
if (!BP)
|
||||
{
|
||||
TypeMismatch(TEXT("graph"), TEXT("Blueprint or Material"));
|
||||
PrintPathExplanation();
|
||||
return SetError();
|
||||
}
|
||||
|
||||
@@ -269,7 +270,6 @@ WingFetcher& WingFetcher::Node(const FString& Value)
|
||||
if (Graph == nullptr)
|
||||
{
|
||||
TypeMismatch(TEXT("node"), TEXT("Graph"));
|
||||
PrintPathExplanation();
|
||||
return SetError();
|
||||
}
|
||||
|
||||
@@ -298,7 +298,6 @@ WingFetcher& WingFetcher::Pin(const FString& Value)
|
||||
if (!N)
|
||||
{
|
||||
TypeMismatch(TEXT("pin"), TEXT("node"));
|
||||
PrintPathExplanation();
|
||||
return SetError();
|
||||
}
|
||||
UEdGraphPin *Found = WingUtils::FindExactlyOneNamed(Value, N->Pins, TEXT("pin"));
|
||||
@@ -324,7 +323,6 @@ WingFetcher& WingFetcher::Component(const FString& Value)
|
||||
if (!BP)
|
||||
{
|
||||
TypeMismatch(TEXT("component"), TEXT("Blueprint"));
|
||||
PrintPathExplanation();
|
||||
return SetError();
|
||||
}
|
||||
|
||||
@@ -359,7 +357,6 @@ WingFetcher& WingFetcher::Widget(const FString& Value)
|
||||
if (!WidgetBP)
|
||||
{
|
||||
TypeMismatch(TEXT("widget"), TEXT("WidgetBlueprint"));
|
||||
PrintPathExplanation();
|
||||
return SetError();
|
||||
}
|
||||
|
||||
@@ -388,7 +385,6 @@ WingFetcher& WingFetcher::LevelBlueprint(const FString& Value)
|
||||
if (!World)
|
||||
{
|
||||
TypeMismatch(TEXT("levelblueprint"), TEXT("world"));
|
||||
PrintPathExplanation();
|
||||
return SetError();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user