apache / apache/brpc

error reporting/handling: consider not abort() in a library

Open
#806 0 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

In brpc, the error handling mechanism is, in some place, just abort() so the application exits.

It is usually considered harmful for a library to exit an application abruptly, so consider better error reporting and handling mechanism.

For example, let the application register a callback if some error happens and let the decision be made by upper level whether to exit or do something else (clean up, retry, report, etc)

Contributor guide

Open the contributing guide

Research direction

Start by locating the abort() calls and related error-handling paths in brpc. Review how those failures are currently reported and identify the API and lifecycle implications of allowing applications to choose whether to exit, clean up, retry, or report. Done requires an agreed design and implementation scope for non-aborting library behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.