sql: be specific about catching type error, and raise it up to find where this is called from
sql: be specific about catching type error, and raise it up to find where this is called from

git-svn-id: bf82309ee31681273af20a825c7064ea7c5af838@1370610 13f79535-47bb-0310-9956-ffa450edef68

stroucki/tashi,stroucki/tashi,stroucki/tashi