Skip to content

Commit

Permalink
[GR-17457] Handle a null backtrace in ThreadManager#setException
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4108
  • Loading branch information
eregon committed Jan 10, 2024
2 parents 16e1906 + 54728bb commit 286d3a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ private void setThreadValue(RubyThread thread, Object value) {
private void setException(RubyThread thread, RubyException exception, Node currentNode) {
// We materialize the backtrace eagerly here, as the exception escapes the thread and needs
// to capture the backtrace from this thread.
final RaiseException truffleException = exception.backtrace.getRaiseException();
RaiseException truffleException = exception.backtrace == null ? null : exception.backtrace.getRaiseException();
if (truffleException != null) {
TruffleStackTrace.fillIn(truffleException);
}
Expand Down

0 comments on commit 286d3a4

Please sign in to comment.