Information on function caller?
am 12.02.2009 17:20:41 von harlequin2Hi group,
I am unsatisfied with the following situation and would like to ask your advice on how to handle this:
all of my scripts use a central custom database connection class that handles Oracle connections & stored procedures; this works pretty good, but there's one major drawback of this approach:
whenever an sql query fails, the error is reported by the OCI class with the line number of the $oci->execute() function, but this is not really helpful, I need the line from where my custom oci function was called.
To give you an example:
[CODE]
function eoci_execute ($sql){
$cursor = oci_new_cursor ($this->dbh);
$stmt = oci_parse ($this->dbh, $sql);
oci_bind_by_name ($stmt, "cursor", $cursor, -1, OCI_B_CURSOR);
oci_execute ($stmt); // <---- this is where the error occurs
...
}
$arrValues = $eoci_execute($sql); // <--- but I would like to know this line instead of the above line!!
[/CODE]
is there any way (like special variables) to get information on a function's caller? Or should I best throw an Exception, so that the error is reported back to the caller?
Thanks in advance!
--
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php