equal
deleted
inserted
replaced
30 import java.text.MessageFormat; |
30 import java.text.MessageFormat; |
31 import java.util.Locale; |
31 import java.util.Locale; |
32 import java.util.ResourceBundle; |
32 import java.util.ResourceBundle; |
33 |
33 |
34 import jdk.nashorn.api.scripting.NashornException; |
34 import jdk.nashorn.api.scripting.NashornException; |
35 import jdk.nashorn.internal.scripts.JS$; |
35 import jdk.nashorn.internal.scripts.JS; |
36 |
36 |
37 /** |
37 /** |
38 * Helper class to throw various standard "ECMA error" exceptions such as Error, ReferenceError, TypeError etc. |
38 * Helper class to throw various standard "ECMA error" exceptions such as Error, ReferenceError, TypeError etc. |
39 */ |
39 */ |
40 public final class ECMAErrors { |
40 public final class ECMAErrors { |
53 } |
53 } |
54 |
54 |
55 /** We assume that compiler generates script classes into the known package. */ |
55 /** We assume that compiler generates script classes into the known package. */ |
56 private static final String scriptPackage; |
56 private static final String scriptPackage; |
57 static { |
57 static { |
58 String name = JS$.class.getName(); |
58 String name = JS.class.getName(); |
59 scriptPackage = name.substring(0, name.lastIndexOf('.')); |
59 scriptPackage = name.substring(0, name.lastIndexOf('.')); |
60 } |
60 } |
61 |
61 |
62 private ECMAErrors() { |
62 private ECMAErrors() { |
63 } |
63 } |