Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose exception in IAction.Execute() #875

Merged
merged 3 commits into from
May 21, 2020

Conversation

longfin
Copy link
Member

@longfin longfin commented May 20, 2020

This PR addresses #860. specifically, it has the following changes.

  • Added IAction.RenderError() and IAction.UnrenderError() to report an exception raised by IAction.Execute() to game developer.
  • Added ActionEvalution.Exception to record whether an exception occurred while executing an action.
  • ActionEvalution.EvaluateActionsGradually() (and related methods) no longer throw UnexpectedlyTerminatedActionException. instead, they record it to ActionEvaluations.

@longfin longfin force-pushed the feature/860 branch 2 times, most recently from 712e68b to bdb5711 Compare May 20, 2020 11:38
@longfin longfin self-assigned this May 20, 2020
@longfin longfin changed the title [WIP] Expose exception in IAction.Execute() Expose exception in IAction.Execute() May 20, 2020
@longfin longfin marked this pull request as ready for review May 20, 2020 11:40
@codecov
Copy link

codecov bot commented May 20, 2020

Codecov Report

Merging #875 into master will decrease coverage by 0.12%.
The diff coverage is 52.00%.

@@            Coverage Diff             @@
##           master     #875      +/-   ##
==========================================
- Coverage   87.56%   87.44%   -0.13%     
==========================================
  Files         250      250              
  Lines       22685    22733      +48     
==========================================
+ Hits        19865    19878      +13     
- Misses       1475     1523      +48     
+ Partials     1345     1332      -13     
Impacted Files Coverage Δ
Libplanet.Tests/Action/PolymorphicActionTest.cs 78.04% <0.00%> (-4.01%) ⬇️
Libplanet.Tests/Common/Action/BaseAction.cs 25.00% <0.00%> (-25.00%) ⬇️
Libplanet.Tests/Common/Action/DumbAction.cs 81.97% <0.00%> (-1.96%) ⬇️
Libplanet.Tests/Common/Action/MinerReward.cs 66.12% <0.00%> (-4.57%) ⬇️
Libplanet.Tests/Net/SwarmTest.cs 94.80% <0.00%> (-0.30%) ⬇️
Libplanet.Tests/Store/StoreTest.cs 98.14% <0.00%> (-0.41%) ⬇️
Libplanet/Action/PolymorphicAction.cs 92.45% <0.00%> (-3.63%) ⬇️
Libplanet/Store/StoreExtensions.cs 43.85% <0.00%> (-3.32%) ⬇️
Libplanet/Tx/Transaction.cs 91.66% <ø> (ø)
Libplanet.Tests/Common/Action/ThrowException.cs 80.00% <50.00%> (-11.67%) ⬇️
... and 9 more

earlbread
earlbread previously approved these changes May 21, 2020
riemannulus
riemannulus previously approved these changes May 21, 2020
CHANGES.md Outdated Show resolved Hide resolved
Libplanet/Action/ActionEvaluation.cs Outdated Show resolved Hide resolved
Libplanet/Action/IAction.cs Outdated Show resolved Hide resolved
Libplanet/Action/IAction.cs Outdated Show resolved Hide resolved
Libplanet/Action/IAction.cs Outdated Show resolved Hide resolved
@longfin longfin dismissed stale reviews from riemannulus and earlbread via 4eb0ba7 May 21, 2020 05:19
Co-authored-by: Hong Minhee <hong.minhee@gmail.com>
earlbread
earlbread previously approved these changes May 21, 2020
Libplanet/Action/IAction.cs Outdated Show resolved Hide resolved
Co-authored-by: Hong Minhee <hong.minhee@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants