A few more error reporting improvements

This commit is contained in:
2026-03-25 17:39:33 -04:00
parent 654511c6cf
commit 93b396578f

View File

@@ -248,12 +248,11 @@ WingFetcher& WingFetcher::Graph(const FString& Value)
UEdGraph* Found = WingUtils::FindExactlyOneNamed(Value, Graphs, TEXT("graph"));
if (!Found)
{
UWingServer::Printf(TEXT("Graphs that exist in blueprint:"));
UWingServer::Printf(TEXT("Graphs that exist in blueprint:\n"));
for (const UEdGraph *G : Graphs)
{
UWingServer::Printf(TEXT(" %s"), *WingUtils::FormatName(G));
UWingServer::Printf(TEXT(" %s\n"), *WingUtils::FormatName(G));
}
UWingServer::Printf(TEXT("\n"));
return SetError();
}
@@ -278,12 +277,11 @@ WingFetcher& WingFetcher::Node(const FString& Value)
UEdGraphNode *Node = WingUtils::FindExactlyOneNamed(Value, AllNodes, TEXT("node"));
if (Node == nullptr)
{
UWingServer::Printf(TEXT("Nodes that exist in graph:"));
UWingServer::Printf(TEXT("Nodes that exist in graph:\n"));
for (const UEdGraphNode *N : AllNodes)
{
UWingServer::Printf(TEXT(" %s"), *WingUtils::FormatName(N));
UWingServer::Printf(TEXT(" %s\n"), *WingUtils::FormatName(N));
}
UWingServer::Printf(TEXT("\n"));
return SetError();
}
SetObj(Node);
@@ -303,12 +301,11 @@ WingFetcher& WingFetcher::Pin(const FString& Value)
UEdGraphPin *Found = WingUtils::FindExactlyOneNamed(Value, N->Pins, TEXT("pin"));
if (!Found)
{
UWingServer::Printf(TEXT("Pins that exist in the node:"));
UWingServer::Printf(TEXT("Pins that exist in the node:\n"));
for (const UEdGraphPin *P : N->Pins)
{
UWingServer::Printf(TEXT(" %s"), *WingUtils::FormatName(P));
UWingServer::Printf(TEXT(" %s\n"), *WingUtils::FormatName(P));
}
UWingServer::Printf(TEXT("\n"));
return SetError();
}
SetPin(Found);
@@ -330,12 +327,11 @@ WingFetcher& WingFetcher::Component(const FString& Value)
FWingActorComponent* Comp = WingUtils::FindExactlyOneNamed(Value, AllComponents, TEXT("component"));
if (!Comp)
{
UWingServer::Printf(TEXT("Components that exist in the blueprint:"));
UWingServer::Printf(TEXT("Components that exist in the blueprint:\n"));
for (const FWingActorComponent &C : AllComponents)
{
UWingServer::Printf(TEXT(" %s"), *WingUtils::FormatName(C));
UWingServer::Printf(TEXT(" %s\n"), *WingUtils::FormatName(C));
}
UWingServer::Printf(TEXT("\n"));
return SetError();
}
@@ -365,12 +361,11 @@ WingFetcher& WingFetcher::Widget(const FString& Value)
UWidget* Found = WingUtils::FindExactlyOneNamed(Value, AllWidgets, TEXT("widget"));
if (!Found)
{
UWingServer::Printf(TEXT("Widgets that exist in the blueprint:"));
UWingServer::Printf(TEXT("Widgets that exist in the blueprint:\n"));
for (const UWidget *W : AllWidgets)
{
UWingServer::Printf(TEXT(" %s"), *WingUtils::FormatName(W));
UWingServer::Printf(TEXT(" %s\n"), *WingUtils::FormatName(W));
}
UWingServer::Printf(TEXT("\n"));
return SetError();
}
SetObj(Found);