| 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 | |
| 5 | package org.mozilla.javascript; |
| 6 | |
| 7 | /** |
| 8 | * This class distinguishes between the three different supported stack trace formats. |
| 9 | */ |
| 10 | |
| 11 | public enum StackStyle { |
| 12 | /** |
| 13 | * This is the default stack trace style in Rhino, which is like Java: |
| 14 | * <code> at fileName:lineNumber (functionName)</code> |
| 15 | */ |
| 16 | RHINO, |
| 17 | |
| 18 | /** |
| 19 | * This stack trace style comes from the old Mozilla code: |
| 20 | * <code>functionName()@fileName:lineNumber</code> |
| 21 | */ |
| 22 | MOZILLA, |
| 23 | |
| 24 | /** |
| 25 | * This stack trace style matches that output from V8, either: |
| 26 | * <code> at functionName (fileName:lineNumber:columnNumber)</code> |
| 27 | * or, for anonymous functions: |
| 28 | * <code> at fileName:lineNumber:columnNumber</code> |
| 29 | */ |
| 30 | V8 |
| 31 | } |