Logging and exception cleanup

Discussion in 'Bukkit Preview' started by Wolvereness, Feb 18, 2012.

  1. Offline

    Wolvereness Bukkit Team Member

    • getPluginDescription will not throw an InvalidPluginException, will instead exclusively throw InvalidDescriptionException
    • loadPlugin will not throw an InvalidDescriptionException, will instead throw InvalidPluginException with InvalidDescriptionException as cause if applicable
    • UnknownDependencyException is now a RuntimeException, because the general contract is that loadPlugin should only be called after dependencies have been considered, thus, UnknownDependencyException should not be thrown under any normal circumstances.
    • InvalidPluginException, UnknownDependencyException, and InvalidDescriptionException have new SVUIDs, and will no longer overwrite methods, giving functionality back to the base Exception class.
    • UnknownSoftDependencyException is removed.
    • Various places that Logger is used to print exception information has been made more consistent and lets Logger be responsible for message and cause printing. This part was added because they were relying exclusively on the messages and cause.
    • Various places that reflection would cause an InvocationTargetException will now skip InvocationTargetException by chaining the InvocationTargetException's cause instead of the InvocationTargetException itself. This means your stack traces from events will be more straightforward.
     
    Technius likes this.

Share This Page