[Neo VM Optimization]Print stack exception#3326
Merged
NGDAdmin merged 3 commits intoneo-project:masterfrom Jun 18, 2024
Merged
Conversation
AnnaShaleva
reviewed
Jun 11, 2024
| #if VMPERF | ||
| if (ex != null) | ||
| { | ||
| Console.Error.WriteLine(ex); |
Member
There was a problem hiding this comment.
Quite a useful one. Just for the record, in NeoGo we always log FAULT exceptions with WARN severity level:
2024-06-11T20:13:18.476+0300 WARN contract invocation failed {"tx": "3d82c9a5da51d2163895c67672380e5a4ba26cba1d400098d75ae82475e6a712", "block": 5782, "error": "at instruction 0 (PUSH1): gas limit is exceeded"}
So may be it's worth to consider add some more additional info to the message (like transaction hash, block number and etc). But it's just a suggestion.
Contributor
Author
There was a problem hiding this comment.
Currently this is only used for debugging purpose. But i get your point, we can have more logs like what you mentioned.
cschuchardt88
approved these changes
Jun 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Its not clear what probem happens while testing it, thus we have VMPerf flag to show the executed opcode, but we still cant see the exception message, thus having this pr to print the exception message to the console as well.
Fixes # For debugging the UT fail issue in #3325
Type of change
Test Configuration:
Checklist: