* @copyright Copyright (c) 2013 - 2015, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 * ---------------------------------------------------------------------------- */ /** * Database Exception Class */ class DatabaseException extends Exception {} /** * Validation Exception Class */ class ValidationException extends Exception {} /** * Notification Exception Class */ class NotificationException extends Exception {} /** * Sync Exception Class */ class SyncException extends Exception {} /** * Print an exception to an HTML text. * * This method is used to display exceptions in a way that is useful and easy * for the user to see. It uses the Bootstrap CSS accordion markup to display * the message and when the user clicks on it the exception trace will be revealed. * We display only one exceptions at a time because the user needs to be able * to display the details of each exception seperately. (In contrast with js). * * @param Exception $exc The exception to be displayed. * @return string Returns the html markup of the exception. */ function exceptionToHtml($exc) { return '
' . $exc->getTraceAsString() . '