Conversation
|
Ready for review. @neo-project/core @neo-project/ngd-shanghai |
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Shargon <shargon@gmail.com>
| private void Finish(ApplicationEngine engine) | ||
| { | ||
| Transaction tx = (Transaction)engine.ScriptContainer; | ||
| OracleResponse response = tx.GetAttribute<OracleResponse>(); |
There was a problem hiding this comment.
| OracleResponse response = tx.GetAttribute<OracleResponse>(); | |
| OracleResponse response = tx.GetAttribute<OracleResponse>(); | |
| if (response == null) throw new ArgumentException("Oracle response was not found"); |
There was a problem hiding this comment.
What's the difference? If response is null, it will throw exception in the next line because of response.Id.
There was a problem hiding this comment.
Yes, it's not a fix, its for debugging purpose now that we have the fault exception it's good to provide the specific error.
| Transaction tx = (Transaction)engine.ScriptContainer; | ||
| OracleResponse response = tx.GetAttribute<OracleResponse>(); | ||
| if (response == null) throw new ArgumentException("Oracle response was not found"); | ||
| OracleRequest request = GetRequest(engine.Snapshot, response.Id); |
There was a problem hiding this comment.
| OracleRequest request = GetRequest(engine.Snapshot, response.Id); | |
| OracleRequest request = GetRequest(engine.Snapshot, response.Id); | |
| if (request == null) throw new ArgumentException("Oracle request was not found"); |
There was a problem hiding this comment.
If request is null, it will throw exception in the next line because of request.UserData.
There was a problem hiding this comment.
Yes, it's not a fix, its for debugging purpose now that we have the fault exception it's good to provide the specific error.
shargon
left a comment
There was a problem hiding this comment.
My unique concern it's #1738 (comment) But we can move on !
No description provided.