#598: run_sql reports errors wrong
-----------------------+-------------------------------
Reporter: jblayloc | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: MiscUtil | Version:
Resolution: | Keywords: warning exception
-----------------------+-------------------------------
Comment (by jblayloc):
the above query has no syntax errors. It just happens that the values you
are using are not matching the expected types for the column.
That doesn't count as a syntax error? I'm *very* surprised by this. Do
you know why they do it that way?
A warning is a special kind of Python message, that is half-way to an
exception, and can be indeed transformed into this.
Yes, I figured some of this out yesterday evening after filing this
ticket. I was thinking about whether I should devote time to figuring out
how to make dbquery do the magic dance to get warnings instatiated as
exceptions. I'm tempted to say that mysql problems should always throw
exceptions, but that may be too extreme; I think your suggestion about
gating on CFG_DEVEL_SITE is a good one.
So you say you've already figured out how to do this...? :)
--
Ticket URL: <http://invenio-software.org/ticket/598#comment:2>
Invenio <http://invenio-software.org>