Revision 3677
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/db_xml.py | ||
---|---|---|
62 | 62 |
return put(db, node, row_ins_ct_ref, on_error, col_defaults, |
63 | 63 |
in_table, parent_ids_loc, next) |
64 | 64 |
|
65 |
def augment_error(e): exc.add_msg(e, 'node:\n'+str(node)) |
|
65 | 66 |
def on_error_(e): |
66 |
exc.add_msg(e, 'node:\n'+str(node))
|
|
67 |
augment_error(e)
|
|
67 | 68 |
on_error(e) |
68 | 69 |
|
69 | 70 |
is_func = xml_func.is_func(node) |
... | ... | |
135 | 136 |
try: pkeys_loc = sql_io.put_table(db, out_table, in_tables, row, |
136 | 137 |
row_ins_ct_ref, next, col_defaults, on_error_) |
137 | 138 |
except Exception, e: |
138 |
on_error_(e)
|
|
139 |
return None
|
|
139 |
augment_error(e)
|
|
140 |
raise
|
|
140 | 141 |
|
141 | 142 |
sql.empty_temp(db, set(in_tables) - no_empty) |
142 | 143 |
|
Also available in: Unified diff
db_xml.py: put(): Don't suppress exceptions thrown by sql_io.put_table() by passing them to on_error(), because some exceptions indicate unrecoverable database connection problems such as a broken connection, which should abort the import