registratie_carem /webroot/updates/concrete5.6.0.2/concrete/startup/exceptions.php

Language PHP Lines 24
MD5 Hash 9230ae575a40b820665a3cb6f700d5a2 Estimated Cost $421 (why?)
Repository https://bitbucket.org/microwebedu/registratie_carem.git View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php  
defined('C5_EXECUTE') or die("Access Denied.");
function Concrete5_Exception_Handler($e) {
	// log if setup to do so
	if (ENABLE_LOG_ERRORS) {
		$db = Loader::db();
		$tables = $db->MetaTables();
		if (in_array('Logs', $tables)) {
			$l = new Log(LOG_TYPE_EXCEPTIONS, true, true);
			$l->write(t('Exception Occurred: ') . sprintf("%s:%d %s (%d)\n", $e->getFile(), $e->getLine(), $e->getMessage(), $e->getCode()));
			$l->write($e->getTraceAsString());
			$l->close();
		}
	}

	if (Config::get('SITE_DEBUG_LEVEL') == DEBUG_DISPLAY_ERRORS) {
		View::renderError(t('An unexpected error occurred.'), $e->getMessage(), $e);		
	} else {
		View::renderError(t('An unexpected error occurred.'), t('An error occurred while processing this request.'), $e);
	}
}

set_exception_handler('Concrete5_Exception_Handler');
Back to Top