Skip to content

Commit

Permalink
[GR-18163] Refactor constructing a SystemCallError's message string
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4440
  • Loading branch information
andrykonchin committed Jan 6, 2025
2 parents b8b31d7 + 3cdd1b1 commit d4d37ce
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,7 @@ def self.comparison_error_message(x, y)
end

def self.format_errno_error_message(errno_description, errno, extra_message, location)
message = errno_description || "Unknown error: #{errno}"
message += " @ #{location}" if location
message += " - #{extra_message}" if extra_message
+message
"#{errno_description || "Unknown error: #{errno}"}#{" @ #{location}" if location}#{" - #{extra_message}" if extra_message}"
end
end
end

0 comments on commit d4d37ce

Please sign in to comment.