Skip to content

Conversation

@Andre601
Copy link
Collaborator

@Andre601 Andre601 commented Dec 27, 2020

Pull Request

Type

  • Internal change (Doesn't affect end-user).
  • External change (Does affect end-user).
  • Wiki (Changes towards the Wiki).
  • Other: __________

Description

Closes #515
Closes #516

When an expansion doesn't contain any class files (Being it malformed download or broken build) will PlaceholderAPI throw an exception when it attempts to log the failed loading of an expansion, essentially breaking the logging. Please see #515 for full context.

This Pull request is NOT finished yet as we still need to find a solution to fix this issue while still logging the failed load of an expansion.

In addition have some of the lines been updated to not provide missinformation (Often such errors happen due to a missing dependency and not an outdated expansion)

@PiggyPiglet
Copy link
Member

In the non null filter, we need to log an error saying which was null, so the user can remove that expansion or fix it.

@Andre601
Copy link
Collaborator Author

Andre601 commented Jan 3, 2021

In the non null filter, we need to log an error saying which was null, so the user can remove that expansion or fix it.

Which one do you mean with "non null filter"? The filter(Objects::nonNull)?

@PiggyPiglet
Copy link
Member

PiggyPiglet commented Jan 3, 2021

In the non null filter, we need to log an error saying which was null, so the user can remove that expansion or fix it.

Which one do you mean with "non null filter"? The filter(Objects::nonNull)?

yeah L#328 LocalExpansionManager

@Andre601
Copy link
Collaborator Author

Andre601 commented Jan 3, 2021

In the non null filter, we need to log an error saying which was null, so the user can remove that expansion or fix it.

Which one do you mean with "non null filter"? The filter(Objects::nonNull)?

yeah L#328 LocalExpansionManager

The bigger issue here is, that we can't even log properly as a null object such as the file's name is enough to break things.
See Line 364 (Currently commented out)
If there is an alternative method to get the name should it be mentioned.

@Andre601
Copy link
Collaborator Author

Andre601 commented Jan 3, 2021

Additionally does the Objects::nonNull check not work either as the stream there is only looking for the jar files to exist (which they do) but doesn't do checks for if the file is actually valid and not corrupted.

@PiggyPiglet PiggyPiglet merged commit d342c73 into master Jan 3, 2021
@Andre601 Andre601 deleted the fix/515-improve-logging branch April 12, 2021 14:08
@Andre601 Andre601 added this to the 2.11.0 milestone May 6, 2021
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.

[Proposal] Improve logging of errors and similar Error when registering expansions

3 participants