Skip to content

8381208: Init cause with the caught runtime exception#30656

Open
aivanov-jdk wants to merge 1 commit intoopenjdk:masterfrom
aivanov-jdk:8381208-PrinterException-init-cause
Open

8381208: Init cause with the caught runtime exception#30656
aivanov-jdk wants to merge 1 commit intoopenjdk:masterfrom
aivanov-jdk:8381208-PrinterException-init-cause

Conversation

@aivanov-jdk
Copy link
Copy Markdown
Member

@aivanov-jdk aivanov-jdk commented Apr 9, 2026

Set the cause of a PrinterException to the RuntimeException caught during printing, thus wrap any other exception that occurs during printer into a PrinterException.

I updated the test to print to a file—there's no need to send a print job to a physical printer. (Otherwise, the test asked me to select a file for the PDF Printer that I had.)


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Error

 ⚠️ Pull request body is missing required line: - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).

Issue

  • JDK-8381208: Init cause with the caught runtime exception (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30656/head:pull/30656
$ git checkout pull/30656

Update a local copy of the PR:
$ git checkout pull/30656
$ git pull https://git.openjdk.org/jdk.git pull/30656/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30656

View PR using the GUI difftool:
$ git pr show -t 30656

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30656.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 9, 2026

👋 Welcome back aivanov! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 9, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Apr 9, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 9, 2026

@aivanov-jdk The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 9, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 9, 2026

Webrevs

try {
job.print(doc, attributes);
} catch (PrintException e) {
throw new PrinterException(e.toString());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we update this block as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It makes sense but under another bug id because this one is a regression of JDK-8268675.

I'd like not to mix the changes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should we update this block as well?

I submitted JDK-8382024: Propagate PrintException wrapped in PrinterException.

@openjdk openjdk bot removed the rfr Pull request is ready for review label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants