From d4564d1570d14dd4a253a88b14910026432da42f Mon Sep 17 00:00:00 2001 From: Shargon Date: Sat, 24 Feb 2024 00:04:39 +0100 Subject: [PATCH] Add method in exception (#3164) --- src/Neo/SmartContract/ApplicationEngine.Contract.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Neo/SmartContract/ApplicationEngine.Contract.cs b/src/Neo/SmartContract/ApplicationEngine.Contract.cs index 5e45ba4645..1677396f1c 100644 --- a/src/Neo/SmartContract/ApplicationEngine.Contract.cs +++ b/src/Neo/SmartContract/ApplicationEngine.Contract.cs @@ -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;