apache / apache/maven-scm

Don't catch Throwable

Open
#1,301 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
104
Forks
189
Avg merge
17h 46m
Merged PRs (30d)
6

Description

### Affected version

head

### Bug description

We do this

```
} catch (Throwable t) {
onExit(-1, t.getClass().getSimpleName());
}
```

in at least one place in GitPackCommand and in HgScmProvider. see https://stackoverflow.com/questions/6083248/is-it-a-bad-practice-to-catch-throwable for reasons not to do this

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Throwable catch sites in GitPackCommand and HgScmProvider, then read the surrounding exit handling. Confirm the intended behavior for errors that are not ordinary exceptions and verify that both named locations no longer catch Throwable without introducing regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.