Proposed change to the Interplugin communication API
#11
The Plugin object may still exist but that doesn't mean that the plugins internal state is valid, if the plugin has caused a backtrace in means that there is something wrong with its state and carrying on is likely to lead to corruption and hard to debug errors, similar to the issues caused by on error resume next in vb and C++ heap corruption bugs. There are two types of errors, recoverable and fatal. Fatal errors should cause all data to be replaced in addition to the current execution path as something has gone wrong with the programmers assumptions, eg Assert failures. recoverable errors require that the program actually do something to fix its state so that the recoverable error is not repeated. For example in the database error the program needs to rollback whatever it was working on or it will be in a state the programmer did not expect. If a plugin causes a stacktrace and does not do anything to handle it, which it cannot in the current interface the only option is for MCServer to clear the state and reinitialize the plugin which causes the creation of an invalid plugin object.
I'm trying to change some things that are broken(exposure of locking in interthread communication and threadguarding hook objects) whilst also improving some things that are not broken but cause unexpected issues.
Reply
Thanks given by:


Messages In This Thread
RE: Proposed change to the Interplugin communication API - by worktycho - 01-12-2014, 06:30 AM



Users browsing this thread: 5 Guest(s)