Since I use a single access style system that loads the application and includes the correct file (this is basically a controller system), I can use:
<?php try { require 'bootstrap.php'; // dispatch controller require "controllers/$controller.php"; } catch (Exception $e) { // echo info } catch (LibraryException $le) { // library specific exception }
Then when I want to throw an error, I just:
throw new Exception('An error occurred.');
Can someone suggest a best practice or something that you do to be able to properly manage a large list of error messages and successes through the app.
This is how I manage mass errors, but not how to manage a list. I could grep for the error messages I find, but this is not very organized.
source share