Skip to content

Conversation

@AnkitCLI
Copy link
Collaborator

@AnkitCLI AnkitCLI commented Apr 14, 2025

image image image

@AnkitCLI AnkitCLI requested a review from psainics April 14, 2025 09:31
@Nullable ErrorContext errorContext, ErrorType errorType) {
String errorMessage = e.getMessage();
return ErrorUtils.getProgramFailureException(new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN),
errorMessage, String.format(ERROR_MESSAGE_FORMAT, errorContext.getPhase(),
Copy link
Collaborator

@psainics psainics Apr 15, 2025

Choose a reason for hiding this comment

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

errorContext can be null

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

List<Throwable> causalChain = Throwables.getCausalChain(e);
for (Throwable t : causalChain) {
if (t instanceof FileNotFoundException) {
return getProgramFailureException((FileNotFoundException) t, null, ErrorType.USER );
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we not passing error context here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

@AnkitCLI AnkitCLI force-pushed the addingKnownErrorsInFileErrorDetailsProvider branch from 0229703 to 848b7fe Compare April 15, 2025 06:05
@AnkitCLI AnkitCLI requested a review from psainics April 15, 2025 06:06
@AnkitCLI AnkitCLI force-pushed the addingKnownErrorsInFileErrorDetailsProvider branch from 848b7fe to 20f07d2 Compare April 21, 2025 10:01
return getFileBasedExceptionDetails(e, errorContext);
}

public ProgramFailureException getFileBasedExceptionDetails(Exception e, ErrorContext errorContext) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

mark errorContext with @ Nullable

Copy link
Collaborator

Choose a reason for hiding this comment

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

also let the function accept error reason

@AnkitCLI AnkitCLI force-pushed the addingKnownErrorsInFileErrorDetailsProvider branch 7 times, most recently from 623fa36 to c93e883 Compare April 23, 2025 15:40
@AnkitCLI AnkitCLI force-pushed the addingKnownErrorsInFileErrorDetailsProvider branch from c93e883 to 7124ab6 Compare April 23, 2025 15:41
@psainics psainics merged commit d6b2928 into develop Apr 24, 2025
2 checks passed
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.

3 participants