10000 handle missing caller due to throws annotation · utPLSQL/utPLSQL-SQLDeveloper@266268e · GitHub
[go: up one dir, main page]

Skip to content

Commit 266268e

Browse files
handle missing caller due to throws annotation
1 parent bb94bc5 commit 266268e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

sqldev/src/main/java/org/utplsql/sqldev/model/runner/Expectation.xtend

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Expectation extends AbstractModel {
2828
def getFailureText() {
2929
return '''
3030
«message.trim»
31-
«caller.trim»
31+
«caller?.trim»
3232
'''.toString.trim
3333
}
3434

@@ -38,10 +38,12 @@ class Expectation extends AbstractModel {
3838

3939
def getCallerLine() {
4040
var Integer line = null
41-
val p = Pattern.compile("(?i)\"[^\\\"]+\",\\s+line\\s*([0-9]+)")
42-
val m = p.matcher(caller)
43-
if (m.find) {
44-
line = Integer.valueOf(m.group(1))
41+
if (caller !== null) {
42+
val p = Pattern.compile("(?i)\"[^\\\"]+\",\\s+line\\s*([0-9]+)")
43+
val m = p.matcher(caller)
44+
if (m.find) {
45+
line = Integer.valueOf(m.group(1))
46+
}
4547
}
4648
return line
4749
}

0 commit comments

Comments
 (0)
0