mirror of
https://github.com/actions/runner.git
synced 2025-12-12 15:13:30 +00:00
Add logging to errors
This commit is contained in:
committed by
GitHub
parent
efffbaeabc
commit
4c777889ae
@@ -141,7 +141,7 @@ namespace GitHub.Runner.Worker
|
|||||||
foreach (var error in templateContext.Errors)
|
foreach (var error in templateContext.Errors)
|
||||||
{
|
{
|
||||||
Trace.Error($"Action.yml load error: {error.Message}");
|
Trace.Error($"Action.yml load error: {error.Message}");
|
||||||
executionContext.Error(error.Message);
|
executionContext.Error("And let's duplicate errors: " + error.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ArgumentException($"Fail to load {fileRelativePath}");
|
throw new ArgumentException($"Fail to load {fileRelativePath}");
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
|||||||
{
|
{
|
||||||
if (!keys.Contains(property.Key))
|
if (!keys.Contains(property.Key))
|
||||||
{
|
{
|
||||||
m_context.Error(mapping, $"Required property is missing: {property.Key}");
|
m_context.Error(mapping, "Template evaluator error " + $"Required property is missing: {property.Key}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
|||||||
nonDuplicates.Sort();
|
nonDuplicates.Sort();
|
||||||
|
|
||||||
String listToDeDuplicate = String.Join(", ", nonDuplicates);
|
String listToDeDuplicate = String.Join(", ", nonDuplicates);
|
||||||
m_context.Error(mapping, TemplateStrings.UnableToDetermineOneOf(listToDeDuplicate));
|
m_context.Error(mapping, "Template reader error: " + TemplateStrings.UnableToDetermineOneOf(listToDeDuplicate));
|
||||||
}
|
}
|
||||||
else if (mappingDefinitions.Count == 1 && !hasExpressionKey)
|
else if (mappingDefinitions.Count == 1 && !hasExpressionKey)
|
||||||
{
|
{
|
||||||
@@ -289,7 +289,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
|||||||
{
|
{
|
||||||
if (!keys.Contains(property.Key))
|
if (!keys.Contains(property.Key))
|
||||||
{
|
{
|
||||||
m_context.Error(mapping, $"Required property is missing: {property.Key}");
|
m_context.Error(mapping, "Template Reader error " + $"Required property is missing: {property.Key}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user