Skip to content

Try harder to format error messages #1026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2015
Merged

Try harder to format error messages #1026

merged 1 commit into from
Apr 28, 2015

Conversation

jamill
Copy link
Member

@jamill jamill commented Apr 20, 2015

Try harder to capture relevant information when generating error message from an exception. This also marshals text as UTF8, as expected by libgit2.

TODO:

  • Formatting of error message
  • Tests covering formatting exceptions

This is currently a private method, so I can't test it as is. I could either 1) expose the method that generates error messages from exceptions as a public utility method, or 2) wire up a sub transport that just throws exceptions and verify the exception message...

/cc @ethomson

@nulltoken
Copy link
Member

  1. wire up a sub transport that just throws exceptions and verify the exception message...

That could also work from an odbBackend

@jamill jamill force-pushed the jamill/set_error branch 2 times, most recently from 6f6f0ae to d36cb2a Compare April 28, 2015 15:49
@jamill
Copy link
Member Author

jamill commented Apr 28, 2015

That could also work from an odbBackend

That worked pretty well. How do you feel about the formatting?

#endregion

}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add trailing newline...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LIES!!!!! :trollface:

@jamill jamill force-pushed the jamill/set_error branch from d36cb2a to 56028ed Compare April 28, 2015 20:31
Also marshals text as UTF8, as expected by libgit2.
@jamill jamill force-pushed the jamill/set_error branch from 56028ed to 983ce49 Compare April 28, 2015 20:36
@nulltoken nulltoken added this to the v0.22 milestone Apr 28, 2015
nulltoken added a commit that referenced this pull request Apr 28, 2015
Try harder to format error messages
@nulltoken nulltoken merged commit 8febb35 into vNext Apr 28, 2015
@nulltoken nulltoken deleted the jamill/set_error branch April 28, 2015 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants