1
0

StackTrace.html 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>StackTrace - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">StackTrace</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Class representing a stack trace for debugging purposes.</p></div>
  16. </header>
  17. <article>
  18. <div class="container-overview">
  19. <h2>Constructor</h2>
  20. <h3 class="name name-method" id="StackTrace" translate="no">new <a href="#StackTrace">StackTrace</a><span class="signature">( stackMessage : <span class="param-type">Error | string | null</span> )</span> </h3>
  21. <div class="method">
  22. <div class="description">
  23. <p>Creates a StackTrace instance by capturing and filtering the current stack trace.</p>
  24. </div>
  25. <table class="params">
  26. <tbody>
  27. <tr>
  28. <td class="name">
  29. <strong translate="no">stackMessage</strong>
  30. </td>
  31. <td class="description last">
  32. <p>An optional stack trace to use instead of capturing a new one.</p>
  33. <p>Default is <code>null</code>.</p>
  34. </td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <h3 class="name" id="isStackTrace" translate="no">.<a href="#isStackTrace">isStackTrace</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  43. <div class="description">
  44. <p>This flag can be used for type testing.</p>
  45. <p>Default is <code>true</code>.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="stack" translate="no">.<a href="#stack">stack</a><span class="type-signature"> : Array.&lt;{fn: string, file: string, line: number, column: number}></span> </h3>
  50. <div class="description">
  51. <p>The stack trace.</p>
  52. </div>
  53. </div>
  54. <h2 class="subsection-title">Methods</h2>
  55. <h3 class="name name-method" id="getError" translate="no">.<a href="#getError">getError</a><span class="signature">( message : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
  56. <div class="method">
  57. <div class="description">
  58. <p>Returns the full error message including the stack trace.</p>
  59. </div>
  60. <table class="params">
  61. <tbody>
  62. <tr>
  63. <td class="name">
  64. <strong translate="no">message</strong>
  65. </td>
  66. <td class="description last">
  67. <p>The error message.</p>
  68. </td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. <dl class="details">
  73. <dt class="tag-returns"><strong>Returns:</strong> The full error message with stack trace.</dt>
  74. </dl>
  75. </div>
  76. <h3 class="name name-method" id="getLocation" translate="no">.<a href="#getLocation">getLocation</a><span class="signature">()</span><span class="type-signature"> : string</span> </h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>Returns a formatted location string of the top stack frame.</p>
  80. </div>
  81. <dl class="details">
  82. <dt class="tag-returns"><strong>Returns:</strong> The formatted stack trace message.</dt>
  83. </dl>
  84. </div>
  85. <h2 class="subsection-title">Source</h2>
  86. <p>
  87. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/StackTrace.js" translate="no" target="_blank" rel="noopener">src/nodes/core/StackTrace.js</a>
  88. </p>
  89. </article>
  90. </section>
  91. <script src="../scripts/linenumber.js"></script>
  92. <script src="../scripts/page.js"></script>
  93. </body>
  94. </html>
粤ICP备19079148号