Skip to content

Conversation

tnleeuw
Copy link
Contributor

@tnleeuw tnleeuw commented May 12, 2025

A small first step towards improving our ErrorMessageFormatters

Closes #8952

@tnleeuw tnleeuw requested a review from a team as a code owner May 12, 2025 08:25
@tnleeuw tnleeuw requested review from evandongen and nielsm5 May 12, 2025 08:25
@tnleeuw tnleeuw self-assigned this May 12, 2025
Comment on lines 127 to 129
} else {
return message + ": "+t.getMessage();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else {
return message + ": "+t.getMessage();
}
}
return message + ": "+t.getMessage();

Comment on lines -136 to -140
PipeForward exceptionForward = findForward(PipeForward.EXCEPTION_FORWARD_NAME);
if (exceptionForward != null) {
log.warn("exception occurred, forwarded to [{}]", exceptionForward.getPath(), e);
return new PipeRunResult(exceptionForward, new ErrorMessageFormatter().format(null, e, this, message, session.getMessageId(), 0));
}
Copy link
Member

Choose a reason for hiding this comment

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

Ging dit goed? erg fijn dat deze pukkel weg is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ja dat lijkt goed te gaan! UnitTest hiermee uitgebreid.

PipeRunResult prr = doPipe(pipe, DUMMY_STRING_SEMI_COLON, session);
// Verify that behaviour does not change when using the ExceptionHandlingPipeProcessor for exception forwarding instead of handling it in the CompressPipe
ExceptionHandlingPipeProcessor ehpp = new ExceptionHandlingPipeProcessor();
CorePipeProcessor cpp = new CorePipeProcessor();
Copy link
Member

Choose a reason for hiding this comment

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

Dit is de binneste processor, daar zit de exceptionhandling-pipe-processor niet omheen toch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Omdat CorePipeProcessor de binnentste is, wordt deze aangeroepen door de ExceptionHandlingPipeProcessor.
De ExceptionHandlingPipeProcessor moet een genestte PipeProcessor hebben, anders komt er een NullPointerException.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, nu snap ik hem. doPipe in de PipeTestBase roept inderdaad de processor niet aan (al is die er wel).

Copy link

@nielsm5 nielsm5 merged commit 20850c8 into master May 12, 2025
32 checks passed
@nielsm5 nielsm5 deleted the feature/8748_ErrorMessageFormatterImprovements branch May 12, 2025 14:07
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.

Always use ErrorMessageFormatter defined on the Adapter
3 participants