Skip to content
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

Print the stack trace when a plugin fails to load due to an exception thrown from its constructor #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhro
Copy link

@zhro zhro commented Oct 3, 2022

I've been having issues using this plugin manager for development where the plugin fails to load due to an exception being thrown from the plugin's constructor. SpigotPluginManager would swallow the exception and simply report PM | Could not load the plugin <name>. (Invalid plugin file), which did not provide any useful information as to where the error occurred.

I added a simple call to printStackTrace() in the loadPlugin() method to fix this. There are some other exceptions nearby that don't print a stack trace either, but I don't have any tests for them, and further modifications are outside the scope of my current use case.

Print the stack trace when a plugin fails to load due to an exception thrown from its constructor.
@Lenni0451
Copy link
Owner

Would and nice if you could move the e.printStackTrace() up one line so it's above the comment like everywhere else and also add one in the catch block of the UnknownDependencyException as well

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.

2 participants