Report error during execute_sql_script routine.

This commit is contained in:
Jocelyn Fiat
2017-10-17 13:43:06 +02:00
parent 1c149f9daf
commit 40855d73d3

View File

@@ -205,6 +205,7 @@ feature -- Helper
local
i: INTEGER
err: BOOLEAN
err_msg: STRING_32
cl: CELL [INTEGER]
l_sql: STRING
do
@@ -228,7 +229,15 @@ feature -- Helper
sql_modify (l_sql, a_params)
sql_finalize_modify (l_sql)
end
err := err or has_error
if has_error then
if err_msg = Void then
create err_msg.make_empty
else
err_msg.append_character ('%N')
end
err_msg.append (error_handler.as_string_representation)
err := True
end
reset_error
end
i := i + cl.item
@@ -238,6 +247,7 @@ feature -- Helper
end
if err then
sql_rollback_transaction
error_handler.add_custom_error (-1, "execute_sql_script error", err_msg)
else
sql_commit_transaction
end
@@ -271,7 +281,7 @@ feature -- Helper
sql_finalize_query (l_sql)
end
feature -- Access
feature -- Access
sql_start
-- Set the cursor on first element.
@@ -281,7 +291,7 @@ feature -- Access
end
sql_after: BOOLEAN
-- Are there no more items to iterate over?
-- Are there no more items to iterate over?
require
no_error: not has_error
deferred