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