diff --git a/src/Neo/SmartContract/ApplicationEngine.Helper.cs b/src/Neo/SmartContract/ApplicationEngine.Helper.cs index 8da61efb03e..5d2976c2884 100644 --- a/src/Neo/SmartContract/ApplicationEngine.Helper.cs +++ b/src/Neo/SmartContract/ApplicationEngine.Helper.cs @@ -19,10 +19,10 @@ namespace Neo.SmartContract { public partial class ApplicationEngine : ExecutionEngine { - public string? GetEngineStackInfoOnFault(bool exceptionStackTrace = true, bool exceptionMessage = true) + public string GetEngineStackInfoOnFault(bool exceptionStackTrace = true, bool exceptionMessage = true) { if (State != VMState.FAULT || FaultException == null) - return null; + return ""; StringBuilder traceback = new(); if (CallingScriptHash != null) traceback.AppendLine($"CallingScriptHash={CallingScriptHash}[{NativeContract.ContractManagement.GetContract(SnapshotCache, CallingScriptHash)?.Manifest.Name}]"); @@ -40,10 +40,10 @@ public partial class ApplicationEngine : ExecutionEngine return traceback.ToString(); } - public string? GetEngineExceptionInfo(bool exceptionStackTrace = true, bool exceptionMessage = true) + public string GetEngineExceptionInfo(bool exceptionStackTrace = true, bool exceptionMessage = true) { if (State != VMState.FAULT || FaultException == null) - return null; + return ""; StringBuilder traceback = new(); Exception baseException = FaultException.GetBaseException(); if (exceptionStackTrace)