title: set_error_handler & set_exception_handler
body: <p>I use the following functions to set error control:</p>
  
  <pre><code>set_error_handler
  set_exception_handler
  </code></pre>
  
  <p>When an error occurs, it calls this function which captures the errors and stores it to the database before redirect the user to a generic page</p>
  
  <pre><code>function log_error($exception)
   {
    if(is_object($exception))
     log_action(ERROR, "Exception with message " . $exception-&gt;getMessage() . " thrown in " . $exception-&gt;getFile() . " on line " . $exception-&gt;getLine(), base_url() . $_SERVER["REQUEST_URI"]);
    else
     log_action(ERROR, "Unable to catch exception. print out: " . print_r($exception, true), base_url() . $_SERVER["REQUEST_URI"]);
  
    header("Location: " . base_url() . "public_error_notification");
   }
  </code></pre>
  
  <p>This usually works except a lot of times instead of getting an error object, I just get a number. Two numbers I get all the time are 8 and 2. You can see I account for those numbers in my error log. My question is, what do these numbers mean? When I looked it up, it made sense because there were error codes for files, but the errors I am getting now have nothing to do with files. I assume that they are error code, so is there any way that I can get a list of error codes that can be returned?</p>