Hide exception when build errors occurs in referenced targets
This commit is contained in:
@@ -628,8 +628,11 @@ namespace Flax.Build
|
||||
}
|
||||
}
|
||||
if (failed)
|
||||
{
|
||||
Globals.BuildErrors = true;
|
||||
throw new Exception($"Failed to build target {target.Name}. See log.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Verbose($"Skipping build for target {target.Name}");
|
||||
@@ -689,8 +692,11 @@ namespace Flax.Build
|
||||
}
|
||||
}
|
||||
if (failed)
|
||||
{
|
||||
Globals.BuildErrors = true;
|
||||
throw new Exception($"Failed to build target {target.Name}. See log.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Verbose($"Skipping build for target {target.Name}");
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace Flax.Build
|
||||
/// </summary>
|
||||
public static ProjectInfo Project;
|
||||
|
||||
/// <summary>
|
||||
/// Set when any build related errors were raised.
|
||||
/// </summary>
|
||||
public static bool BuildErrors = false;
|
||||
|
||||
/// <summary>
|
||||
/// All platforms array.
|
||||
/// </summary>
|
||||
|
||||
@@ -171,6 +171,8 @@ namespace Flax.Build
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Ignore exception logging for build errors
|
||||
if (!Globals.BuildErrors)
|
||||
Log.Exception(ex);
|
||||
failed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user