-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GR-19613] T-Trace exceptions are normal language exceptions.
PullRequest: graal/4916
- Loading branch information
Showing
9 changed files
with
173 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
agent.on('enter', function checkLogging(ev, frame) { | ||
if (frame.msg === 'are') { | ||
throw "great you are!"; | ||
} | ||
}, { | ||
roots: true, | ||
rootNameFilter: (n) => n === 'log' | ||
}); | ||
agent.on('return', function checkLogging(ev, frame) { | ||
if (frame.msg === 'do') { | ||
throw "you feel?"; | ||
} | ||
if (frame.msg === 'bad') { | ||
throw "good you are?"; | ||
} | ||
}, { | ||
roots: true, | ||
rootNameFilter: (n) => n === 'log' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
>[7] js --jvm --experimental-options --agentscript=agent-exception.js -f log.js -e "howAreYou()" | ||
Hello T-Trace. | ||
How | ||
great you are! | ||
.*at <js> checkLogging.* | ||
.*at <js> log.log.js:1-6:18-103. | ||
.*at <js> howAreYou.log.js:11:176-185. | ||
|
||
>[7] js --experimental-options --agentscript=agent-exception.js -f log.js -e "howAreYou()" | ||
Hello T-Trace. | ||
How | ||
great you are! | ||
.*at <js> checkLogging.* | ||
.*at <js> log.log.js:1-6:18-103. | ||
.*at <js> howAreYou.log.js:11:176-185. | ||
|
||
>[7] js --experimental-options --agentscript=agent-exception.js -f log.js -e "howDoYouDo()" | ||
Hello T-Trace! | ||
How | ||
do | ||
you feel? | ||
.*at <js> checkLogging.* | ||
.*at <js> log.log.js:1-6:18-103. | ||
.*at <js> howDoYouDo.log.js:18:279-287. | ||
.*at <js> :program.<eval_script>:1:0-11. | ||
>[7] js --experimental-options --agentscript=agent-exception.js -f log.js -e "areYouBad()" | ||
Hello T-Trace! | ||
How | ||
good you are? | ||
.*at <js> checkLogging.* | ||
.*at <js> log.log.js:1-6:18-103. | ||
.*at <js> areYouBad.log.js:26:395-404. | ||
.*at <js> :program.<eval_script>:1:0-10. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
agent.on("enter", ->(a1) { | ||
puts "What's #{a1}?" | ||
}, { | ||
statements: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
>[1] ruby --experimental-options --agentscript=interop-exception.rb -e 'def x(t) puts("x=#{t}"); end; x(6 * 7)' | ||
interop-exception.rb:1.*wrong number of arguments.*given 2.*expected 1.* | ||
.*from.*main.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
function log(msg) { | ||
if (msg === 'bad') { | ||
throw 'bad is not allowed'; | ||
} | ||
print(msg); | ||
} | ||
|
||
function howAreYou() { | ||
log('Hello T-Trace!'); | ||
log('How'); | ||
log('are'); | ||
log('You?'); | ||
} | ||
|
||
function howDoYouDo() { | ||
log('Hello T-Trace!'); | ||
log('How'); | ||
log('do'); | ||
log('you'); | ||
log('do?'); | ||
} | ||
|
||
function areYouBad() { | ||
log('Hello T-Trace!'); | ||
log('How'); | ||
log('bad'); | ||
log('are'); | ||
log('you?'); | ||
} |