aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/db_indexes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/db_indexes.rb')
-rw-r--r--lib/sisu/v6/db_indexes.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/sisu/v6/db_indexes.rb b/lib/sisu/v6/db_indexes.rb
index 876fd856..12c427dd 100644
--- a/lib/sisu/v6/db_indexes.rb
+++ b/lib/sisu/v6/db_indexes.rb
@@ -82,9 +82,23 @@ module SiSU_DbIndex
end
end
def conn_execute_array(sql_arr)
- @conn.transaction do |conn|
- sql_arr.each do |sql|
- conn_execute_sql(conn,sql)
+ begin
+ @conn.transaction do |conn|
+ sql_arr.each do |sql|
+ conn_execute_sql(conn,sql)
+ end
+ end
+ rescue
+ if @conn.is_a?(NilClass)
+ errmsg="No sqlite3 connection (check sqlite3 dependencies)"
+ if @opt.act[:no_stop][:set]==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error("#{errmsg}, proceeding without sqlite output (as requested)")
+ else
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error("#{errmsg}, STOPPING")
+ exit
+ end
end
end
end