Added error handling
-Error handling for:
--PHP Errors
--Exceptions

Options to display error with debug_on opion in config.php
Option to log exception in system log