Error Handling Since 'sct_config' is our user interface, it is imperative that it reports errors to the user clearly and concisely and not drown him in useless debugging data. Each function that encounters an error throws an exception with as much context information as it has. What line of the file was the error on, what was the token that caused the error, etc. Once thrown, an exception travels upwards in the call chain until a suitable exception handler is found. An exception handler could add information only it has to the exception and re-throw it, or it could report it to the user.