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