1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

B #4337: add onedb update body readable errors (#4338)

This commit is contained in:
Alejandro Huertas Herrero 2020-03-12 14:29:22 +01:00 committed by GitHub
parent a43e5c3812
commit 1c7d784265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ class OneDBLive
row = hash['SQL_COMMAND']['RESULT']['ROW'] rescue nil
if !row
raise 'Empty SQL query result: '
raise 'Empty SQL query result'
end
[row].flatten.compact
@ -491,8 +491,9 @@ class OneDBLive
begin
db_data = select(table, "oid = #{id}")
rescue StandardError => e
STDERR.puts "Error getting object id #{o.id}"
STDERR.puts "Error getting #{object} with id #{id}"
STDERR.puts e.message
exit(-1)
end
row = db_data.first
@ -514,8 +515,9 @@ class OneDBLive
update_body(table, xml, "oid = #{id}", federate)
rescue StandardError => e
STDERR.puts "Error updating object id #{id}"
STDERR.puts "Error updating #{object} with id #{id}"
STDERR.puts e.message
exit(-1)
end
end