Skip to content

GITHUB-2807 - Failsafe buildStackTrace - #2808

Merged
juherr merged 1 commit into
testng-team:masterfrom
seregamorph:GITHUB-2807
Oct 6, 2022
Merged

juherr merged 1 commit into
testng-team:masterfrom
seregamorph:GITHUB-2807

Conversation

@seregamorph

Copy link
Copy Markdown
Contributor

Fixes #2807.

Did you remember to?

  • Add test case(s)
  • Update CHANGES.txt
  • Auto applied styling via ./gradlew autostyleApply

We encourage pull requests that:

  • Add new features to TestNG (or)
  • Fix bugs in TestNG

If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.

Note: For more information on contribution guidelines please make sure you refer our Contributing section for detailed set of steps.

t.printStackTrace(pw);
} catch (Throwable e) {
// failsafe in case if printStackTrace throws exception
pw.println(t.getClass().getName());

@seregamorph seregamorph Oct 4, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this may be not perfect exception handling, but in case if t.printStackTrace(pw) throws exception (see #2807) we do not have much options here, at least we do not rethrow it

@juherr
juherr merged commit fba0723 into testng-team:master Oct 6, 2022
@seregamorph
seregamorph deleted the GITHUB-2807 branch November 4, 2022 14:54
@juherr juherr added this to the 7.7.0 milestone Sep 7, 2026 — with ChatGPT Codex Connector
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.

Non-failsafe printStackTrace in html reporter

3 participants