* @since Beta 2.0 * @return void **/ function error($type, $message, $file = null, $line = 0) { global $set; // Get the settings! if (isset($_GET['debug']) || function_exists('error_fatal') || !(error_reporting() & $type)) { return; } include $set['include_path'] . '/lib/error.php'; switch($type) { // Triggered PDNS-Admin errors case PDNSADMIN_ERROR: exit(error_warning($message, $file, $line)); break; // Triggered PDNS-Admin notices and alerts case PDNSADMIN_NOTICE: exit(error_notice($message)); break; // Database errors case PDNSADMIN_QUERY_ERROR: exit(error_fatal($type, $message, $file, $line)); break; // PHP errors default: exit(error_fatal($type, $message, $file, $line)); break; } } ?>