Skip to content
Permalink
Browse files
JavaStackTrace: Added missing lookbehinds (#3116)
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent ede55b2 commit cfb2e782a13517b217eb12567e94671a445c9759
@@ -9,10 +9,11 @@ Prism.languages.javastacktrace = {
// Caused by: MidLevelException: LowLevelException
// Suppressed: Resource$CloseFailException: Resource ID = 0
'summary': {
pattern: /^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,
pattern: /^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,
lookbehind: true,
inside: {
'keyword': {
pattern: /^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,
pattern: /^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,
lookbehind: true
},

@@ -26,7 +27,7 @@ Prism.languages.javastacktrace = {
lookbehind: true,
inside: {
'class-name': /[\w$]+(?=$|:)/,
'namespace': /[a-z]\w*/,
'namespace': /\b[a-z]\w*\b/,
'punctuation': /[.:]/
}
},
@@ -61,7 +62,8 @@ Prism.languages.javastacktrace = {
// https://github.com/matcdac/jdk/blob/2305df71d1b7710266ae0956d73927a225132c0f/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java#L1108
// However, to keep this simple, a version will be matched by the pattern /@[\w$.+-]*/.
'stack-frame': {
pattern: /^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,
pattern: /^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,
lookbehind: true,
inside: {
'keyword': {
pattern: /^(\s*)at(?= )/,
@@ -77,7 +79,7 @@ Prism.languages.javastacktrace = {
'file': /^\w+\.\w+/,
'punctuation': /:/,
'line-number': {
pattern: /\d+/,
pattern: /\b\d+\b/,
alias: 'number'
}
}
@@ -116,7 +118,7 @@ Prism.languages.javastacktrace = {
}
},
'namespace': {
pattern: /(?:[a-z]\w*\.)+/,
pattern: /(?:\b[a-z]\w*\.)+/,
inside: {
'punctuation': /\./
}
@@ -128,7 +130,8 @@ Prism.languages.javastacktrace = {
// ... 32 more
// ... 32 common frames omitted
'more': {
pattern: /^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,
pattern: /^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,
lookbehind: true,
inside: {
'punctuation': /\.{3}/,
'number': /\d+/,

Some generated files are not rendered by default. Learn more.

@@ -77,7 +77,7 @@ Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer fi
]],
["punctuation", ")"]
]],
" ~[na:1.8.0_171]\r\n",
" ~[na:1.8.0_171]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -100,7 +100,7 @@ Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer fi
]],
["punctuation", ")"]
]],
" ~[na:1.8.0_171]\r\n",
" ~[na:1.8.0_171]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -123,7 +123,7 @@ Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer fi
]],
["punctuation", ")"]
]],
" ~[na:1.8.0_171]\r\n",
" ~[na:1.8.0_171]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -259,7 +259,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft)
]],
["punctuation", ")"]
]],
" ~[Loader.class:?]\r\n",
" ~[Loader.class:?]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -284,7 +284,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft)
]],
["punctuation", ")"]
]],
" ~[Loader.class:?]\r\n",
" ~[Loader.class:?]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -309,7 +309,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft)
]],
["punctuation", ")"]
]],
" ~[FMLServerHandler.class:?]\r\n",
" ~[FMLServerHandler.class:?]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -334,7 +334,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft)
]],
["punctuation", ")"]
]],
" ~[FMLCommonHandler.class:?]\r\n",
" ~[FMLCommonHandler.class:?]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -359,7 +359,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft)
]],
["punctuation", ")"]
]],
" ~[nz.class:?]\r\n",
" ~[nz.class:?]\r\n\t",

["stack-frame", [
["keyword", "at"],
@@ -382,7 +382,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft)
]],
["punctuation", ")"]
]],
" [MinecraftServer.class:?]\r\n",
" [MinecraftServer.class:?]\r\n\t",

["stack-frame", [
["keyword", "at"],

0 comments on commit cfb2e78

Please sign in to comment.