Forum Moderators: coopster

Message Too Old, No Replies

The hazard(s) of a database abstraction layer

         

sned

8:05 pm on May 15, 2006 (gmt 0)

10+ Year Member



So I wrote my own abstraction layer (a very simple one), something like:

function db_fetch_object($result){
return mysql_fetch_object($result)
}

etc....

I've added in several of my own functions, which has made my code much shorter. Overall, The php5 object model is great to work with.

However, there's a small, almost non-issue problem: Whenever an error gets thrown, it shows as coming from the Database class, rather than the page that called the query.

function.mysql-result: Unable to jump to row 0 on MySQL result index 23 in includes/class_Database.php on line 130

Has anyone come up with a solution to this type of problem or run into this type of problem before?

Thanks!
-sned

defireman

7:41 pm on May 16, 2006 (gmt 0)

10+ Year Member



Have you ever thought of printing a stack trace?