Skip to content

Commit

Permalink
Try to use Frame#absolute_path if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Jan 11, 2021
1 parent 70be597 commit 2a07e67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/raven/event_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ describe Raven::Event do
frames[0][:lineno].should eq(1412)
frames[0][:colno].should eq(1)
frames[0][:function].should eq("other_function")
frames[0][:abs_path].should eq("some/relative/path")
frames[0][:filename].should eq(frames[0][:abs_path])
frames[0][:abs_path].should eq("#{Dir.current}/some/relative/path")
frames[0][:filename].should eq("some/relative/path")
frames[0][:package].should be_nil
frames[0][:in_app].should be_false

Expand Down
2 changes: 1 addition & 1 deletion src/raven/interfaces/stacktrace.cr
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Raven

def self.from_backtrace_frame(line)
new.tap do |frame|
frame.abs_path = line.path
frame.abs_path = line.absolute_path || line.path
frame.filename = line.relative_path
frame.function = line.method
frame.package = line.shard_name
Expand Down

0 comments on commit 2a07e67

Please sign in to comment.