StackTrace() public method

Generate a stack trace that's close enough to a normal mono stack dump that the Unity logger will understand it.
public StackTrace ( string sourcePath, int lineNumber, string toplevelCommand, bool fullTrace ) : string
sourcePath string Path for the source file being loaded.
lineNumber int Current line number in the source file.
toplevelCommand string Original prolog command to output, if stack is empty.
fullTrace bool If true, the complete stack is dumped, otherwise, just the starting frames.
return string
示例#1
0
 /// <summary>
 /// Indicates that a Prolog computation ran for more than its maximum number of allowable steps.
 /// </summary>
 public InferenceStepsExceededException(PrologContext prologContext)
     : base("Prolog ran for longer than was allowed; this may indicate an infinite recursion.")
 {
     trace = prologContext.StackTrace(Prolog.CurrentSourceFile, Prolog.CurrentSourceLineNumber, "IsTrue()", false);
 }
 /// <summary>
 /// Indicates that a Prolog computation ran for more than its maximum number of allowable steps.
 /// </summary>
 public InferenceStepsExceededException(PrologContext prologContext)
     : base("Prolog ran for longer than was allowed; this may indicate an infinite recursion.")
 {
     trace = prologContext.StackTrace(Prolog.CurrentSourceFile, Prolog.CurrentSourceLineNumber, "IsTrue()", false);
 }