IRC-Bot icon indicating copy to clipboard operation
IRC-Bot copied to clipboard

Add proper error handling

Open NanoSector opened this issue 11 years ago • 0 comments

Right now the bot crashes on almost any error that occurs. I have a !exec command up that handles executing PHP code (only by me), but I have to triple-check my code because the bot will crash if anything is wrong with it.

Possibly the main loop could be wrapped in a try {} catch {exception} statement, but that won't catch everything. To add proper error handling the bot'll need a custom error handler like described here: http://php.net/manual/en/function.set-error-handler.php

NanoSector avatar Jan 04 '15 12:01 NanoSector