Dylan K. Taylor b1e0f82cbf
PluginManager: Stop catching exceptions thrown by event handlers (#2472)
The basic principle here is "if you're not expecting it, don't catch it".

Event handlers are **never** supposed to throw exceptions. If they do throw exceptions, it's usually going to one of two things;
1. Broken code producing an error
2. Code triggering (and not catching) a runtime error

Both 1) and 2) boil down to defective code on the part of the event handler, and thus should not be caught by the caller, but instead allowed to crash the server and produce a crashdump.

It's also undesirable to catch unexpected errors here for a few other reasons
- It leaves the owner of the event handler in an unknown, potentially unstable state
- It allows broken code to cause event handlers to spam the logger in events that happen frequently (for example movement handlers)
- It allows the process to continue down a train of further undefined behaviour, which may lead to more errors or ultimately a crash, so it makes no sense to hold off the inevitable.

This has a few advantages that are not merely inverted disadvantages:
- Crash dumps will now be created and automatically submitted for defective event handlers, allowing quicker issue location, debugging and fixing in plugins without manual user interaction
- Event calling now isn't dependent on Server to work.
2018-10-05 16:46:10 +01:00
2017-06-25 14:15:34 +01:00
2018-08-19 13:47:43 +01:00
2018-07-12 17:23:52 +01:00
2018-06-17 19:59:45 +01:00
2012-12-07 02:24:55 +01:00

PocketMine-MP

A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP

Build Status

Setup, help & support, FAQs

Head over to the documentation site. If you don't find what you're looking for there, talk to a human. Please do not use our issue tracker for support requests.

Discussion

Plugins

There are a very wide range of already-written plugins available which you can use to customise your server. Check out Poggit, or just search GitHub.

For developers

Can I contribute?

Yes you can! Contributions are welcomed provided that they comply with our Contributing Guidelines. Please ensure you read the relevant sections of the guidelines carefully before making a Pull Request or opening an Issue.

Where can I get the latest .phar?

  • Latest release builds can be found in our GitHub releases.
  • Latest bleeding-edge development builds (and other builds in the build job channels) can be found on our Jenkins server.

Note: Please avoid development builds unless there is no other alternative for what you need. Development builds are subject to changes at any time without notice, and it is likely that your server or plugins might break without warning.

Licensing information

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.

Languages
PHP 99.9%