goldigd05 commented on issue #48673:
URL: https://github.com/apache/arrow/issues/48673#issuecomment-3708380516

   Hi, I would like to contribute a fix for 
`Status::ToStringWithoutContextLines()`.
   
   Currently, this function removes context lines using a heuristic based on 
colons (`:`),
   which may accidentally remove parts of the original error message.
   
   My fix approach:
   1. Update `AddContextLine()` to prefix context lines with `[context]`.
   2. Update `ToStringWithoutContextLines()` to strip only lines that start 
with `[context]`.
   3. Add a unit test to ensure that original error messages are preserved 
while context lines are removed.
   
   This change ensures that:
   - Original error messages remain intact.
   - Only the extra context added via `AddContextLine()` is removed.
   - Works even if the error message contains colons.
   
   I am happy to submit a PR implementing this approach. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to