-
Notifications
You must be signed in to change notification settings - Fork 2
Adding User and System Errors in FileErrorDetailsProvider #27
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
Conversation
| @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(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errorContext can be null
There was a problem hiding this comment.
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 ); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
0229703 to
848b7fe
Compare
848b7fe to
20f07d2
Compare
| return getFileBasedExceptionDetails(e, errorContext); | ||
| } | ||
|
|
||
| public ProgramFailureException getFileBasedExceptionDetails(Exception e, ErrorContext errorContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark errorContext with @ Nullable
There was a problem hiding this comment.
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
623fa36 to
c93e883
Compare
c93e883 to
7124ab6
Compare
Uh oh!
There was an error while loading. Please reload this page.