Skip to content

Commit

Permalink
Add method in exception (#3164)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored Feb 23, 2024
1 parent 9373756 commit d4564d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Neo/SmartContract/ApplicationEngine.Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected internal void CallContract(UInt160 contractHash, string method, CallFl
throw new ArgumentOutOfRangeException(nameof(callFlags));

ContractState contract = NativeContract.ContractManagement.GetContract(Snapshot, contractHash);
if (contract is null) throw new InvalidOperationException($"Called Contract Does Not Exist: {contractHash}");
if (contract is null) throw new InvalidOperationException($"Called Contract Does Not Exist: {contractHash}.{method}");
ContractMethodDescriptor md = contract.Manifest.Abi.GetMethod(method, args.Count);
if (md is null) throw new InvalidOperationException($"Method \"{method}\" with {args.Count} parameter(s) doesn't exist in the contract {contractHash}.");
bool hasReturnValue = md.ReturnType != ContractParameterType.Void;
Expand Down

0 comments on commit d4564d1

Please sign in to comment.