Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
## SUMMARY
This adds additional logging for errors experienced during code generation.

## ADDED
* Added logging for exceptions experienced during a code-generation run.
  • Loading branch information
jzapdot committed Aug 5, 2020
1 parent e29aa41 commit f590274
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Scripts/Editor/CodeGeneration/UnityCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ THE SOFTWARE.
*/

using System;
using System.Linq;
using UnityEditor;

namespace JCMG.Genesis.Editor
Expand Down Expand Up @@ -106,8 +105,10 @@ private static void Generate(GenesisSettings[] settingsData)
}
catch (Exception ex)
{
LOGGER.Error(ex, string.Format(EditorConstants.CODE_GENERATION_UPDATE_ERROR_FORMAT, settings.name));

didSucceed = false;
EditorUtility.DisplayDialog("Error", ex.Message, "Ok");
EditorUtility.DisplayDialog("Code Generation Error", ex.Message, "Ok");
}

EditorUtility.ClearProgressBar();
Expand Down
2 changes: 2 additions & 0 deletions Scripts/Editor/EditorConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ internal static class EditorConstants
public const string CODE_GENERATION_FAILURE = LOG_PREFIX + "Code generation failed, process exited with code {0}.";
public const string CODE_GENERATION_UPDATE = LOG_PREFIX + "[{0}] {1}";
public const string CODE_GENERATION_UPDATE_ERROR = LOG_PREFIX + "An unexpected error occured during code generation.";
public const string CODE_GENERATION_UPDATE_ERROR_FORMAT =
LOG_PREFIX + "An unexpected error occured during code generation for GenesisSettings asset [{0}].";

public const string COULD_NOT_FIND_DEFAULT_SETTINGS_SET =
"A single default Settings could not be found. Please update your GenesisSettings asset to mark one " +
Expand Down
8 changes: 4 additions & 4 deletions Scripts/Editor/VersionConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal static class VersionConstants
/// <summary>
/// The semantic version
/// </summary>
public const string VERSION = "1.2.0";
public const string VERSION = "1.2.1";

/// <summary>
/// The branch of GIT this package was published from.
Expand All @@ -18,16 +18,16 @@ internal static class VersionConstants
/// <summary>
/// The current GIT commit hash this package was published on.
/// </summary>
public const string GIT_COMMIT = "1c0c816a3a6eda81d3ef27ad309f59d995fd50b7";
public const string GIT_COMMIT = "a8d8edcd18f327619e6372ca966ff6e5e9ef4525";

/// <summary>
/// The UTC human-readable date this package was published at.
/// </summary>
public const string PUBLISH_DATE = "Saturday, May 2, 2020";
public const string PUBLISH_DATE = "Wednesday, August 5, 2020";

/// <summary>
/// The UTC time this package was published at.
/// </summary>
public const string PUBLISH_TIME = "05/02/2020 11:13:24";
public const string PUBLISH_TIME = "08/05/2020 00:37:05";
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"com.jeffcampbellmakesgames.genesis","displayName":"JCMG Genesis","version":"1.2.0","unity":"2019.1","description":"A general purpose code generation library for Unity","keywords":["JCMG","Code Generation","Genesis","Code","Gen"],"category":"Editor"}
{"name":"com.jeffcampbellmakesgames.genesis","displayName":"JCMG Genesis","version":"1.2.1","unity":"2019.1","description":"A general purpose code generation library for Unity","keywords":["JCMG","Code Generation","Genesis","Code","Gen"],"category":"Editor"}

0 comments on commit f590274

Please sign in to comment.