Skip to content

Commit

Permalink
always return string
Browse files Browse the repository at this point in the history
  • Loading branch information
Hecate2 committed Oct 22, 2024
1 parent 3987e07 commit 07df327
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Neo/SmartContract/ApplicationEngine.Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}]");
Expand All @@ -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)
Expand Down

0 comments on commit 07df327

Please sign in to comment.