tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Procedural File: debug.inc.php

Source Location: /core/debug.inc.php

Page Details

Various function that are helpful when debugging

Filesource:  Source Code for this file
Includes
require_once (TANGRA_MAIN_DIR.'exceptions/te_dbc_sql_failed.class.php') [line 21]

te_dbc_sql_failed needed for SQL highlighting

[ Top ]

require_once (TANGRA_MAIN_DIR.'exceptions/tangra_exception.class.php') [line 17]

Loading exception

[ Top ]

require_once (TANGRA_MAIN_DIR.'exceptions/tangra_exception_error.class.php') [line 29]

Loading exception

[ Top ]

SQL highlighter

[ Top ]


Functions
dprintbr  [line 212]

void dprintbr( [unknown_type $str = '']  )

Debug printbr. Will capture printed content add it to $_dprint_content global var. Later $_dprint_content content will be exported as _debug_print template variable on show.

Parameters:
unknown_type   $str: 

API Tags:
See:  printbr()


[ Top ]
dprint_r_pre  [line 180]

void dprint_r_pre( array $obj  )

Debug print_r_pre(). Will capture printed content add it to $_dprint_content global var. Later $_dprint_content content will be exported as _debug_print template variable on show.

Parameters:
array   $obj: 

API Tags:
See:  print_r_pre()


[ Top ]
dvar_dump_pre  [line 197]

void dvar_dump_pre( $var, mixed $obj  )

Debug var_dump_pre(). Will capture printed content add it to $_dprint_content global var. Later $_dprint_content content will be exported as _debug_print template variable on show.

Parameters:
mixed   $obj: 
   $var: 

API Tags:
See:  var_dump_pre()


[ Top ]
exception_html_print  [line 78]

void exception_html_print( $e  )

Better looking output for exceptions. This function is normally not used directly by the users but by site's boot process to give it as a parameter to PHP's set_exception_handler()

Parameters:
Exception   $e: 


[ Top ]
printbr  [line 55]

void printbr( [unknown_type $str = '']  )

Prints $str and adds
. That way when you use multiple printbr()s each print is on new row. Intended to be used as output in browser.

Parameters:
unknown_type   $str: 

API Tags:
See:  println() for output in CLI mode


[ Top ]
println  [line 153]

void println( [any $str = '']  )

Prints $str and adds new line. Intended to be used in CLI mode

Parameters:
any   $str: 


[ Top ]
print_r_pre  [line 42]

void print_r_pre( any $obj  )

Usefull for printing arrays. Prints (using print_r()) it's paramater surrownded by tags

 and
. That way output looks more structured.

Parameters:
any   $obj: 


[ Top ]
tangra_error_handler  [line 167]

void tangra_error_handler( unknown_type $errno, unknown_type $errstr, unknown_type $errfile, unknown_type $errline  )

Converts errors to exceptions. That way context of the exception can be logged. See Jabba family web sites for more info about exception logging.

Normally this function is not used directly by the users. It is intended to be used by sites' boot process to give it as a parameter to PHP's set_error_handler().

Parameters:
unknown_type   $errno: 
unknown_type   $errstr: 
unknown_type   $errfile: 
unknown_type   $errline: 


[ Top ]
var_dump_pre  [line 66]

void var_dump_pre( any $var  )

Usefull for printing arrays and objects. Prints (using var_dump()) it's paramater surrownded by tags

 and
. That way output looks more structured.

Parameters:
any   $var: 


[ Top ]