Skip to content

Commit

Permalink
Merge pull request #260 from anatawa12/fix-apply-on-play-error-message
Browse files Browse the repository at this point in the history
fix(apply-on-play): class name is not included in abort message
  • Loading branch information
anatawa12 authored Jul 14, 2023
2 parents 3626b1d + 227cb2e commit 9510d23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog].
### Removed

### Fixed
- Name of failed ApplyOnPlayCallback is not included in error message `#260`

### Security

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog].
### Removed

### Fixed
- Name of failed ApplyOnPlayCallback is not included in error message `#260`

### Security

Expand Down
4 changes: 2 additions & 2 deletions Internal/ApplyOnPlay/Editor/ApplyOnPlayCaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ internal static bool ProcessAvatar(GameObject avatarGameObject, ApplyReason reas
if (!applyOnPlayCallback.ApplyOnPlay(avatarGameObject, reason))
{
var message = $"The {action} for {avatarGameObject} was aborted because " +
"'{applyOnPlayCallback.GetType().Name}' reported a failure.";
$"'{applyOnPlayCallback.CallbackName}' reported a failure.";
Debug.LogError(message);
return false;
}
}
catch (Exception ex)
{
var message = $"The {action} for {avatarGameObject} was aborted because " +
"'{applyOnPlayCallback.GetType().Name}' threw an exception.";
$"'{applyOnPlayCallback.CallbackName}' threw an exception.";
Debug.LogError(message);
Debug.LogException(ex);
return false;
Expand Down

0 comments on commit 9510d23

Please sign in to comment.