From bd4e38f4a8c31242caf7d7cbfd3a083a263752b8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 21 Aug 2013 23:09:51 -0400 Subject: v4 v5: rescued error messages --- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/CHANGELOG_v5 | 2 ++ lib/sisu/v4/composite.rb | 4 ++-- lib/sisu/v4/concordance.rb | 6 +++--- lib/sisu/v4/dal.rb | 16 ++++++++-------- lib/sisu/v4/db_drop.rb | 2 +- lib/sisu/v4/db_import.rb | 8 ++++---- lib/sisu/v4/db_select.rb | 2 +- lib/sisu/v4/dbi.rb | 2 +- lib/sisu/v4/dbi_discrete.rb | 4 ++-- lib/sisu/v4/digests.rb | 2 +- lib/sisu/v4/embedded.rb | 2 +- lib/sisu/v4/epub.rb | 12 ++++++------ lib/sisu/v4/epub_concordance.rb | 6 +++--- lib/sisu/v4/epub_segments.rb | 2 +- lib/sisu/v4/epub_tune.rb | 2 +- lib/sisu/v4/errors.rb | 4 ++-- lib/sisu/v4/html.rb | 8 ++++---- lib/sisu/v4/html_scroll.rb | 2 +- lib/sisu/v4/html_segments.rb | 2 +- lib/sisu/v4/html_tune.rb | 2 +- lib/sisu/v4/hub.rb | 2 +- lib/sisu/v4/manifest.rb | 4 ++-- lib/sisu/v4/manpage.rb | 2 +- lib/sisu/v4/odf.rb | 2 +- lib/sisu/v4/param.rb | 4 ++-- lib/sisu/v4/particulars.rb | 22 +++++++++++----------- lib/sisu/v4/plaintext.rb | 2 +- lib/sisu/v4/po4a.rb | 2 +- lib/sisu/v4/qrcode.rb | 4 ++-- lib/sisu/v4/rexml.rb | 2 +- lib/sisu/v4/sitemaps.rb | 2 +- lib/sisu/v4/sst_do_inline_footnotes.rb | 4 ++-- lib/sisu/v4/sst_to_s_xml_sax.rb | 4 ++-- lib/sisu/v4/texpdf.rb | 8 ++++---- lib/sisu/v4/update.rb | 2 +- lib/sisu/v4/urls.rb | 4 ++-- lib/sisu/v4/webrick.rb | 4 ++-- lib/sisu/v4/wikispeak.rb | 2 +- lib/sisu/v4/xhtml.rb | 4 ++-- lib/sisu/v4/xml.rb | 4 ++-- lib/sisu/v4/xml_dom.rb | 4 ++-- lib/sisu/v4/xml_fictionbook.rb | 2 +- lib/sisu/v4/xml_scaffold.rb | 2 +- lib/sisu/v5/composite.rb | 4 ++-- lib/sisu/v5/concordance.rb | 6 +++--- lib/sisu/v5/dal.rb | 16 ++++++++-------- lib/sisu/v5/db_drop.rb | 2 +- lib/sisu/v5/db_import.rb | 8 ++++---- lib/sisu/v5/db_select.rb | 2 +- lib/sisu/v5/dbi.rb | 2 +- lib/sisu/v5/dbi_discrete.rb | 4 ++-- lib/sisu/v5/digests.rb | 2 +- lib/sisu/v5/embedded.rb | 2 +- lib/sisu/v5/epub.rb | 12 ++++++------ lib/sisu/v5/epub_concordance.rb | 6 +++--- lib/sisu/v5/epub_segments.rb | 2 +- lib/sisu/v5/epub_tune.rb | 2 +- lib/sisu/v5/errors.rb | 4 ++-- lib/sisu/v5/html.rb | 8 ++++---- lib/sisu/v5/html_scroll.rb | 2 +- lib/sisu/v5/html_segments.rb | 2 +- lib/sisu/v5/html_tune.rb | 2 +- lib/sisu/v5/hub.rb | 2 +- lib/sisu/v5/manifest.rb | 4 ++-- lib/sisu/v5/manpage.rb | 2 +- lib/sisu/v5/odf.rb | 2 +- lib/sisu/v5/param.rb | 4 ++-- lib/sisu/v5/particulars.rb | 22 +++++++++++----------- lib/sisu/v5/plaintext.rb | 2 +- lib/sisu/v5/po4a.rb | 2 +- lib/sisu/v5/qrcode.rb | 4 ++-- lib/sisu/v5/rexml.rb | 2 +- lib/sisu/v5/sitemaps.rb | 2 +- lib/sisu/v5/sst_do_inline_footnotes.rb | 4 ++-- lib/sisu/v5/sst_to_s_xml_sax.rb | 4 ++-- lib/sisu/v5/texpdf.rb | 8 ++++---- lib/sisu/v5/update.rb | 2 +- lib/sisu/v5/urls.rb | 4 ++-- lib/sisu/v5/webrick.rb | 4 ++-- lib/sisu/v5/wikispeak.rb | 2 +- lib/sisu/v5/xhtml.rb | 4 ++-- lib/sisu/v5/xml.rb | 4 ++-- lib/sisu/v5/xml_dom.rb | 4 ++-- lib/sisu/v5/xml_fictionbook.rb | 2 +- lib/sisu/v5/xml_scaffold.rb | 2 +- 86 files changed, 184 insertions(+), 180 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index a8c083bd..b7be17a4 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.12.orig.tar.xz sisu_4.1.12.orig.tar.xz sisu_4.1.12-1.dsc +* rescued error messages + * fuchsia (sp.) %% 4.1.11.orig.tar.xz (2013-08-08:31/4) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index bf20b9d1..ed975b37 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.12.orig.tar.xz sisu_5.0.12.orig.tar.xz sisu_5.0.12-1.dsc +* rescued error messages + * fuchsia (sp.) %% 5.0.11.orig.tar.xz (2013-08-08:31/4) diff --git a/lib/sisu/v4/composite.rb b/lib/sisu/v4/composite.rb index 0d0655b8..2d537f4a 100644 --- a/lib/sisu/v4/composite.rb +++ b/lib/sisu/v4/composite.rb @@ -103,7 +103,7 @@ module SiSU_Assemble write(assembled) Dir.chdir(pwd) rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -220,7 +220,7 @@ module SiSU_Assemble @fns_array=IO.readlines(@opt.fns,'') insertions? rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/concordance.rb b/lib/sisu/v4/concordance.rb index 567b36e0..5387dce3 100644 --- a/lib/sisu/v4/concordance.rb +++ b/lib/sisu/v4/concordance.rb @@ -99,7 +99,7 @@ module SiSU_Concordance SiSU_Concordance::Source::Words.new(@particulars).songsheet end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -216,7 +216,7 @@ WOK @alphlst=SiSU_i18n::Alphabet.new(@md.opt.lng).hash_strings @rgx_scanlist=%r{#{Mx[:fa_italics_o]}[#{@alphlst[:l]}#{@alphlst[:u]}0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[#{@alphlst[:l]}#{@alphlst[:u]}0-9"\s]{2,12}#{Mx[:fa_bold_c]}|(?:https?|file)://\S+|<\S+?>|[#{@alphlst[:l]}#{@alphlst[:u]}]+|\w+}mi rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -227,7 +227,7 @@ WOK @file_concordance=File.open(@file.place_file.html_concordance.dir,'w') map_para rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/dal.rb b/lib/sisu/v4/dal.rb index e8574528..4a158fb6 100644 --- a/lib/sisu/v4/dal.rb +++ b/lib/sisu/v4/dal.rb @@ -123,7 +123,7 @@ module SiSU_DAL : @opt.fns create_dal rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@@fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@@fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -144,7 +144,7 @@ module SiSU_DAL ? read_fnc : @@dal_array.dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -163,7 +163,7 @@ module SiSU_DAL end dal=(@@idx_arr[:sst].empty?) ? read_idx_sst : @@idx_arr[:sst].dup #check rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -182,7 +182,7 @@ module SiSU_DAL end dal=(@@idx_arr[:tex].empty?) ? read_idx_raw : @@idx_arr[:tex].dup #check rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -201,7 +201,7 @@ module SiSU_DAL end dal=(@@idx_arr[:html].empty?) ? read_idx_html : @@idx_arr[:html].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -220,7 +220,7 @@ module SiSU_DAL end dal=(@@idx_arr[:xhtml].empty?) ? read_idx_xhtml : @@idx_arr[:xhtml].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -239,7 +239,7 @@ module SiSU_DAL end dal=(@@map_arr[:nametags].empty?) ? read_map_nametags : @@map_arr[:nametags].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -258,7 +258,7 @@ module SiSU_DAL end dal=(@@map_arr[:ocn_htmlseg].empty?) ? read_map_ocn_htmlseg : @@map_arr[:ocn_htmlseg].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/db_drop.rb b/lib/sisu/v4/db_drop.rb index 6c6b3cd0..80167822 100644 --- a/lib/sisu/v4/db_drop.rb +++ b/lib/sisu/v4/db_drop.rb @@ -108,7 +108,7 @@ module SiSU_DbDrop sdb.create_table.urls sdb_index.create_indexes rescue - SiSU_Errors::InfoError.new($!,$@,'-D').error do + SiSU_Errors::Rescued.new($!,$@,'-D').location do __LINE__.to_s + ':' + __FILE__ end sdb.output_dir? diff --git a/lib/sisu/v4/db_import.rb b/lib/sisu/v4/db_import.rb index 4f77cdb0..240efd67 100644 --- a/lib/sisu/v4/db_import.rb +++ b/lib/sisu/v4/db_import.rb @@ -171,7 +171,7 @@ module SiSU_DbImport STDERR.puts "Error code: #{e.err}" STDERR.puts "Error message: #{e.errstr}" STDERR.puts "Error SQLSTATE: #{e.state}" - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end sqlfn="#{@env.processing_path.sql}/#{@md.fnb}.sql" @@ -184,7 +184,7 @@ module SiSU_DbImport puts "#{__FILE__}:#{__LINE__}" end rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end sqlfn="#{@env.processing_path.sql}/#{@md.fnb}.sql" @@ -569,7 +569,7 @@ module SiSU_DbImport end end rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -702,7 +702,7 @@ module SiSU_DbImport t=SiSU_DbTuple::LoadUrls.new(@conn,f,u,@@id_t,@opt,@file_maint) tuple=t.tuple rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/db_select.rb b/lib/sisu/v4/db_select.rb index d8b63b3b..f6d07030 100644 --- a/lib/sisu/v4/db_select.rb +++ b/lib/sisu/v4/db_select.rb @@ -127,7 +127,7 @@ module SiSU_DbSelect @sdb.create_table.urls @sdb_index.create_indexes rescue - SiSU_Errors::InfoError.new($!,$@,'-D').error; @sdb.output_dir? do + SiSU_Errors::Rescued.new($!,$@,'-D').location; @sdb.output_dir? do __LINE__.to_s + ':' + __FILE__ end end diff --git a/lib/sisu/v4/dbi.rb b/lib/sisu/v4/dbi.rb index 20443c7c..3cd9dc85 100644 --- a/lib/sisu/v4/dbi.rb +++ b/lib/sisu/v4/dbi.rb @@ -133,7 +133,7 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet begin SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases rescue - SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@cf,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/dbi_discrete.rb b/lib/sisu/v4/dbi_discrete.rb index 5b7d36bf..d96fbe13 100644 --- a/lib/sisu/v4/dbi_discrete.rb +++ b/lib/sisu/v4/dbi_discrete.rb @@ -136,7 +136,7 @@ module SiSU_DBI_Discrete #% database building tell=SiSU_Screen::Ansi.new(@opt.cmd,"sqlite3 #{db.sqlite.db} database?") tell.puts_grey if @opt.cmd =~/v/ rescue - SiSU_Errors::InfoError.new($!,$@,'-d').error do + SiSU_Errors::Rescued.new($!,$@,'-d').location do __LINE__.to_s + ':' + __FILE__ end sdb.output_dir? @@ -154,7 +154,7 @@ module SiSU_DBI_Discrete #% database building SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fns).dbi_title unless @opt.cmd =~/q/ @db.sqlite_discrete.conn_sqlite3 rescue - SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@cf,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/digests.rb b/lib/sisu/v4/digests.rb index 65a379c4..75a340b0 100644 --- a/lib/sisu/v4/digests.rb +++ b/lib/sisu/v4/digests.rb @@ -87,7 +87,7 @@ module SiSU_DigestView end SiSU_DigestView::Source::Scroll.new(@particulars).songsheet rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/embedded.rb b/lib/sisu/v4/embedded.rb index c0be9351..c36af0e5 100644 --- a/lib/sisu/v4/embedded.rb +++ b/lib/sisu/v4/embedded.rb @@ -82,7 +82,7 @@ module SiSU_Embedded multimedia begin rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/epub.rb b/lib/sisu/v4/epub.rb index 0cfdbfa5..d83e3aad 100644 --- a/lib/sisu/v4/epub.rb +++ b/lib/sisu/v4/epub.rb @@ -107,7 +107,7 @@ module SiSU_EPUB SiSU_EPUB::Source::Seg.new(@md,data).songsheet SiSU_EPUB::Source::Output.new(@md).songsheet rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -338,7 +338,7 @@ module SiSU_EPUB @@toc[:seg] << toc[:seg] @@toc[:scr] << toc[:seg] rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -635,7 +635,7 @@ module SiSU_EPUB end out.close rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -650,7 +650,7 @@ module SiSU_EPUB end out.close rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -724,7 +724,7 @@ WOK filename_xhtml.close end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -742,7 +742,7 @@ WOK filename_xhtml.close end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end diff --git a/lib/sisu/v4/epub_concordance.rb b/lib/sisu/v4/epub_concordance.rb index 3a8cea75..838e4595 100644 --- a/lib/sisu/v4/epub_concordance.rb +++ b/lib/sisu/v4/epub_concordance.rb @@ -89,7 +89,7 @@ module SiSU_EPUB_Concordance SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -172,7 +172,7 @@ WOK @rgx_splitlist=%r{[—.,;:-]+|#{Mx[:nbsp]}+}mi @rgx_scanlist=%r{#{Mx[:fa_italics_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_bold_c]}|#{Mx[:url_o]}https?://\S+?#{Mx[:url_c]}|file://\S+|<\S+?>|\w+|[a-zA-Z]+}mi rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -186,7 +186,7 @@ WOK @file_concordance=File.open("#{@path}/content/#{@md.fn[:epub_concord]}",'w') map_para rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/epub_segments.rb b/lib/sisu/v4/epub_segments.rb index ee8ab26e..44db5fe9 100644 --- a/lib/sisu/v4/epub_segments.rb +++ b/lib/sisu/v4/epub_segments.rb @@ -144,7 +144,7 @@ WOK SiSU_EPUB_Seg::Seg.new.cleanup # (((( added )))) #### (((( END )))) #### rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/epub_tune.rb b/lib/sisu/v4/epub_tune.rb index e6e92334..45291ca8 100644 --- a/lib/sisu/v4/epub_tune.rb +++ b/lib/sisu/v4/epub_tune.rb @@ -133,7 +133,7 @@ module SiSU_EPUB_Tune end SiSU_EPUB_Tune::Tune.new(@data,@md).output rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v4/errors.rb b/lib/sisu/v4/errors.rb index 13a58f77..fc9726d4 100644 --- a/lib/sisu/v4/errors.rb +++ b/lib/sisu/v4/errors.rb @@ -62,7 +62,7 @@ module SiSU_Errors require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen - class InfoError |[#{@alphlst[:l]}#{@alphlst[:u]}]+|\w+}mi rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -227,7 +227,7 @@ WOK @file_concordance=File.open(@file.place_file.html_concordance.dir,'w') map_para rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/dal.rb b/lib/sisu/v5/dal.rb index ed03969f..5bf9b87c 100644 --- a/lib/sisu/v5/dal.rb +++ b/lib/sisu/v5/dal.rb @@ -123,7 +123,7 @@ module SiSU_DAL : @opt.fns create_dal rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@@fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@@fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -144,7 +144,7 @@ module SiSU_DAL ? read_fnc : @@dal_array.dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -163,7 +163,7 @@ module SiSU_DAL end dal=(@@idx_arr[:sst].empty?) ? read_idx_sst : @@idx_arr[:sst].dup #check rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -182,7 +182,7 @@ module SiSU_DAL end dal=(@@idx_arr[:tex].empty?) ? read_idx_raw : @@idx_arr[:tex].dup #check rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -201,7 +201,7 @@ module SiSU_DAL end dal=(@@idx_arr[:html].empty?) ? read_idx_html : @@idx_arr[:html].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -220,7 +220,7 @@ module SiSU_DAL end dal=(@@idx_arr[:xhtml].empty?) ? read_idx_xhtml : @@idx_arr[:xhtml].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -239,7 +239,7 @@ module SiSU_DAL end dal=(@@map_arr[:nametags].empty?) ? read_map_nametags : @@map_arr[:nametags].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -258,7 +258,7 @@ module SiSU_DAL end dal=(@@map_arr[:ocn_htmlseg].empty?) ? read_map_ocn_htmlseg : @@map_arr[:ocn_htmlseg].dup rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/db_drop.rb b/lib/sisu/v5/db_drop.rb index caf7faa5..252a311b 100644 --- a/lib/sisu/v5/db_drop.rb +++ b/lib/sisu/v5/db_drop.rb @@ -108,7 +108,7 @@ module SiSU_DbDrop sdb.create_table.urls sdb_index.create_indexes rescue - SiSU_Errors::InfoError.new($!,$@,'-D').error do + SiSU_Errors::Rescued.new($!,$@,'-D').location do __LINE__.to_s + ':' + __FILE__ end sdb.output_dir? diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/v5/db_import.rb index 9025b359..5f89c968 100644 --- a/lib/sisu/v5/db_import.rb +++ b/lib/sisu/v5/db_import.rb @@ -171,7 +171,7 @@ module SiSU_DbImport STDERR.puts "Error code: #{e.err}" STDERR.puts "Error message: #{e.errstr}" STDERR.puts "Error SQLSTATE: #{e.state}" - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end sqlfn="#{@env.processing_path.sql}/#{@md.fnb}.sql" @@ -184,7 +184,7 @@ module SiSU_DbImport puts "#{__FILE__}:#{__LINE__}" end rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end sqlfn="#{@env.processing_path.sql}/#{@md.fnb}.sql" @@ -569,7 +569,7 @@ module SiSU_DbImport end end rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -702,7 +702,7 @@ module SiSU_DbImport t=SiSU_DbTuple::LoadUrls.new(@conn,f,u,@@id_t,@opt,@file_maint) tuple=t.tuple rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/db_select.rb b/lib/sisu/v5/db_select.rb index 845cafde..879862b1 100644 --- a/lib/sisu/v5/db_select.rb +++ b/lib/sisu/v5/db_select.rb @@ -127,7 +127,7 @@ module SiSU_DbSelect @sdb.create_table.urls @sdb_index.create_indexes rescue - SiSU_Errors::InfoError.new($!,$@,'-D').error; @sdb.output_dir? do + SiSU_Errors::Rescued.new($!,$@,'-D').location; @sdb.output_dir? do __LINE__.to_s + ':' + __FILE__ end end diff --git a/lib/sisu/v5/dbi.rb b/lib/sisu/v5/dbi.rb index 2d8ac64e..cc2b614e 100644 --- a/lib/sisu/v5/dbi.rb +++ b/lib/sisu/v5/dbi.rb @@ -133,7 +133,7 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet begin SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases rescue - SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@cf,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/dbi_discrete.rb b/lib/sisu/v5/dbi_discrete.rb index 572ac154..fe921c85 100644 --- a/lib/sisu/v5/dbi_discrete.rb +++ b/lib/sisu/v5/dbi_discrete.rb @@ -136,7 +136,7 @@ module SiSU_DBI_Discrete #% database building tell=SiSU_Screen::Ansi.new(@opt.cmd,"sqlite3 #{db.sqlite.db} database?") tell.puts_grey if @opt.cmd =~/v/ rescue - SiSU_Errors::InfoError.new($!,$@,'-d').error do + SiSU_Errors::Rescued.new($!,$@,'-d').location do __LINE__.to_s + ':' + __FILE__ end sdb.output_dir? @@ -154,7 +154,7 @@ module SiSU_DBI_Discrete #% database building SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fns).dbi_title unless @opt.cmd =~/q/ @db.sqlite_discrete.conn_sqlite3 rescue - SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@cf,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/digests.rb b/lib/sisu/v5/digests.rb index 9eba6544..ea2e81cd 100644 --- a/lib/sisu/v5/digests.rb +++ b/lib/sisu/v5/digests.rb @@ -87,7 +87,7 @@ module SiSU_DigestView end SiSU_DigestView::Source::Scroll.new(@particulars).songsheet rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/embedded.rb b/lib/sisu/v5/embedded.rb index c7fec7ed..5ce0bf04 100644 --- a/lib/sisu/v5/embedded.rb +++ b/lib/sisu/v5/embedded.rb @@ -82,7 +82,7 @@ module SiSU_Embedded multimedia begin rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/epub.rb b/lib/sisu/v5/epub.rb index 960ddd68..26f1dc0d 100644 --- a/lib/sisu/v5/epub.rb +++ b/lib/sisu/v5/epub.rb @@ -107,7 +107,7 @@ module SiSU_EPUB SiSU_EPUB::Source::Seg.new(@md,data).songsheet SiSU_EPUB::Source::Output.new(@md).songsheet rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -338,7 +338,7 @@ module SiSU_EPUB @@toc[:seg] << toc[:seg] @@toc[:scr] << toc[:seg] rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -635,7 +635,7 @@ module SiSU_EPUB end out.close rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -650,7 +650,7 @@ module SiSU_EPUB end out.close rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -724,7 +724,7 @@ WOK filename_xhtml.close end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -742,7 +742,7 @@ WOK filename_xhtml.close end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end diff --git a/lib/sisu/v5/epub_concordance.rb b/lib/sisu/v5/epub_concordance.rb index 8940c3a3..976ca619 100644 --- a/lib/sisu/v5/epub_concordance.rb +++ b/lib/sisu/v5/epub_concordance.rb @@ -89,7 +89,7 @@ module SiSU_EPUB_Concordance SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet end rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -172,7 +172,7 @@ WOK @rgx_splitlist=%r{[—.,;:-]+|#{Mx[:nbsp]}+}mi @rgx_scanlist=%r{#{Mx[:fa_italics_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_bold_c]}|#{Mx[:url_o]}https?://\S+?#{Mx[:url_c]}|file://\S+|<\S+?>|\w+|[a-zA-Z]+}mi rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end end @@ -186,7 +186,7 @@ WOK @file_concordance=File.open("#{@path}/content/#{@md.fn[:epub_concord]}",'w') map_para rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/epub_segments.rb b/lib/sisu/v5/epub_segments.rb index ee85619d..9f483610 100644 --- a/lib/sisu/v5/epub_segments.rb +++ b/lib/sisu/v5/epub_segments.rb @@ -144,7 +144,7 @@ WOK SiSU_EPUB_Seg::Seg.new.cleanup # (((( added )))) #### (((( END )))) #### rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/epub_tune.rb b/lib/sisu/v5/epub_tune.rb index 256ed323..c017c2df 100644 --- a/lib/sisu/v5/epub_tune.rb +++ b/lib/sisu/v5/epub_tune.rb @@ -133,7 +133,7 @@ module SiSU_EPUB_Tune end SiSU_EPUB_Tune::Tune.new(@data,@md).output rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure diff --git a/lib/sisu/v5/errors.rb b/lib/sisu/v5/errors.rb index 9721bf72..37a8e1a5 100644 --- a/lib/sisu/v5/errors.rb +++ b/lib/sisu/v5/errors.rb @@ -62,7 +62,7 @@ module SiSU_Errors require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen - class InfoError