totallymike / ircnode

Extensible IRC bot written with node.js
https://github.com/totallymike/ircnode/wiki
MIT License
4 stars 2 forks source link

Executing plugins in try...catch block #20

Closed sigv closed 12 years ago

sigv commented 12 years ago

Currently if a plugin fails and throws an error, then the whole bot stops. This is not good and plugins maybe fail if some vital part of the bot's source code is updated. Therefore it should be good to execute the plugin in a try...catch block.

sigv commented 12 years ago

After some discussion it was decided that ignoring all exceptions is not a good idea as it may leave the bot in a bad/un-safe state. That is not wanted and the plugin creators should maintain their plugins so that API-change caused exceptions do not occur.