* Outputs a debug backtrace and stops further script execution
*
* @param $message An optional message to output
+ * @param $doExit Whether exit the program (true is default)
* @return void
*/
- public function debugBackTrace ($message = '') {
+ public function debugBackTrace ($message = '', $doExit = true) {
// Sorry, there is no other way getting this nice backtrace
if (!empty($message)) {
// Output message
print('<pre>');
debug_print_backtrace();
print('</pre>');
- exit();
+
+ // Exit program?
+ if ($doExit === true) {
+ exit();
+ } // END - if
}
/**