Skip to content
Snippets Groups Projects

refactor: include source specifier in various errors

Open Антон Фетисов requested to merge afetisov/better-errors into master

Summary

  • refactor: include source specifier in various errors

This allows to easily print the whole underlying error chain by traversing errors via Error::source method, instead of effectively erasing underlying errors as it currently happens. Note that thiserror, unlike anyhow, doesn't provide a way out of the box to print the error chains. Some other library or custom code need to be written to get all errors. However, this commit makes better error printing a purely local decision.

This commit doesn't change any printing of errors via default Display or Debug impls, not does it change the layout of error types.

  • refactor: print pgroto error code in PgError display impl
Edited by Антон Фетисов

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading