internal RubyStackTraceBuilder(RubyContext /*!*/ context, Exception /*!*/ exception, StackTrace catchSiteTrace, bool isCatchSiteInterpreted) : this(context) { // Compiled trace: contains frames starting with the throw site up to the first filter/catch that the exception was caught by: StackTrace throwSiteTrace = GetClrStackTrace(exception); _interpretedFrames = InterpretedFrame.GetExceptionStackTrace(exception); AddBacktrace(throwSiteTrace.GetFrames(), 0, false); // Compiled trace: contains frames above and including the first Ruby filter/catch site that the exception was caught by: if (catchSiteTrace != null) { // Interpreted: skip one interpreter Run method frame - is was already matched with the last processed interpreted frame: // Compiled: skip one frame - the catch-site frame is already included AddBacktrace(catchSiteTrace.GetFrames(), isCatchSiteInterpreted ? 0 : 1, isCatchSiteInterpreted); } }