Fix last unhelpful debug message in db.js

This commit is contained in:
Dan Stillman 2006-08-14 18:44:28 +00:00
parent c92faace52
commit 46fa6484a5

View file

@ -104,7 +104,9 @@ Scholar.DB = new function(){
var statement = statementQuery(sql,params);
}
catch (e){
throw(db.lastErrorString);
var dberr = (db.lastErrorString!='not an error')
? ' [ERROR: ' + db.lastErrorString + ']' : '';
throw(e + ' [QUERY: ' + sql + ']' + dberr);
}
// No rows