Skip to content
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

GITHUB-2807 - Failsafe buildStackTrace #2808

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

seregamorph
Copy link
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());
Copy link
Contributor Author

@seregamorph seregamorph Oct 4, 2022

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
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