Skip to content

Commit

Permalink
Exit upon receiving an Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeage committed Dec 10, 2023
1 parent 36b97cc commit 9b00072
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/Editor/BuildTiltBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,10 @@ static void CommandLine()
{
string oneLineMessage = Ex.Message.Replace("\n", " ");
Debug.LogErrorFormat("::error ::Build failed with Exception <<{0}>>", oneLineMessage);
throw;
Debug.LogError($"{Ex.StackTrace}\n\n");
// For some reason, Unity exits if we rethrow this (or never caught it), but with an exit code of 0. So instead, we'll explicitly exit here
// throw;
Die(6, oneLineMessage);
}
}
}
Expand Down

0 comments on commit 9b00072

Please sign in to comment.