seeing if there's a query error

Right now, I don't see if there's an easy way to retreieve it theres an error with the query in get_results() or get_row() or query(). how do you differenciate in code between no results, and a SQL error?
I don't see nay functions to do that..that would be my biggest request!!

Thanks