aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-08-21 23:22:34 -0400
committerRalph Amissah <ralph@amissah.com>2013-08-21 23:22:34 -0400
commit2c5b71e36a335fc89c5198259166ed7de478819c (patch)
tree6e7abab3e67b2735428a3d0bf80baa964864b29d /lib/sisu/v4
parentdebian/changelog (4.1.11-1) (diff)
parentv5: vim syntax additions, sisu.vim (diff)
Merge tag 'sisu_4.1.12' into debian/sid
SiSU 4.1.12
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/cgi_pgsql.rb4
-rw-r--r--lib/sisu/v4/cgi_sqlite.rb4
-rw-r--r--lib/sisu/v4/composite.rb8
-rw-r--r--lib/sisu/v4/concordance.rb6
-rw-r--r--lib/sisu/v4/constants.rb8
-rw-r--r--lib/sisu/v4/dal.rb16
-rw-r--r--lib/sisu/v4/db_drop.rb2
-rw-r--r--lib/sisu/v4/db_import.rb8
-rw-r--r--lib/sisu/v4/db_select.rb2
-rw-r--r--lib/sisu/v4/dbi.rb2
-rw-r--r--lib/sisu/v4/dbi_discrete.rb4
-rw-r--r--lib/sisu/v4/digests.rb2
-rw-r--r--lib/sisu/v4/embedded.rb2
-rw-r--r--lib/sisu/v4/epub.rb12
-rw-r--r--lib/sisu/v4/epub_concordance.rb6
-rw-r--r--lib/sisu/v4/epub_segments.rb2
-rw-r--r--lib/sisu/v4/epub_tune.rb2
-rw-r--r--lib/sisu/v4/errors.rb4
-rw-r--r--lib/sisu/v4/html.rb8
-rw-r--r--lib/sisu/v4/html_scroll.rb2
-rw-r--r--lib/sisu/v4/html_segments.rb2
-rw-r--r--lib/sisu/v4/html_tune.rb2
-rw-r--r--lib/sisu/v4/hub.rb20
-rw-r--r--lib/sisu/v4/manifest.rb4
-rw-r--r--lib/sisu/v4/manpage.rb2
-rw-r--r--lib/sisu/v4/odf.rb2
-rw-r--r--lib/sisu/v4/param.rb4
-rw-r--r--lib/sisu/v4/particulars.rb22
-rw-r--r--lib/sisu/v4/plaintext.rb2
-rw-r--r--lib/sisu/v4/po4a.rb2
-rw-r--r--lib/sisu/v4/qrcode.rb4
-rw-r--r--lib/sisu/v4/rexml.rb4
-rw-r--r--lib/sisu/v4/screen_text_color.rb30
-rw-r--r--lib/sisu/v4/sitemaps.rb2
-rw-r--r--lib/sisu/v4/sst_do_inline_footnotes.rb4
-rw-r--r--lib/sisu/v4/sst_to_s_xml_sax.rb4
-rw-r--r--lib/sisu/v4/sysenv.rb3
-rw-r--r--lib/sisu/v4/texpdf.rb18
-rw-r--r--lib/sisu/v4/update.rb2
-rw-r--r--lib/sisu/v4/urls.rb4
-rw-r--r--lib/sisu/v4/utils.rb68
-rw-r--r--lib/sisu/v4/webrick.rb4
-rw-r--r--lib/sisu/v4/wikispeak.rb2
-rw-r--r--lib/sisu/v4/xhtml.rb4
-rw-r--r--lib/sisu/v4/xml.rb4
-rw-r--r--lib/sisu/v4/xml_dom.rb4
-rw-r--r--lib/sisu/v4/xml_fictionbook.rb2
-rw-r--r--lib/sisu/v4/xml_scaffold.rb2
48 files changed, 183 insertions, 148 deletions
diff --git a/lib/sisu/v4/cgi_pgsql.rb b/lib/sisu/v4/cgi_pgsql.rb
index 3698f769..f012fb51 100644
--- a/lib/sisu/v4/cgi_pgsql.rb
+++ b/lib/sisu/v4/cgi_pgsql.rb
@@ -133,9 +133,9 @@ module SiSU_CGI_PgSQL
to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@name_of[:host_url_docs]}'#{@cX.off}
cgi search form link name: #{@cX.green}#{@name_of[:cgi_script]}#{@cX.off}
to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@name_of[:cgi_script]}'#{@cX.off}
- #{@cX.fuschia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off}
+ #{@cX.fuchsia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off}
- #{@cX.fuschia}BASED ON ALREADY EXISTING databases#{@cX.off} (default database name: #{@db.psql.db})
+ #{@cX.fuchsia}BASED ON ALREADY EXISTING databases#{@cX.off} (default database name: #{@db.psql.db})
NOTE it is first necessary to createdb,
use sisu to create the tables & populate the postgresql db
diff --git a/lib/sisu/v4/cgi_sqlite.rb b/lib/sisu/v4/cgi_sqlite.rb
index b3b67d42..da7aa97a 100644
--- a/lib/sisu/v4/cgi_sqlite.rb
+++ b/lib/sisu/v4/cgi_sqlite.rb
@@ -120,9 +120,9 @@ module SiSU_CGI_SQLite
to modify use: #{@cX.brown}sisu --db-sqlite --webserv-output='#{@env.url.webserv_files_from_db(@opt)}'#{@cX.off}
cgi search form link name: #{@cX.green}#{@env.url.cgi_sample_search_form_name(@opt)}#{@cX.off}
to modify use: #{@cX.brown}sisu --db-sqlite --cgi-search-form-name='#{@env.url.cgi_sample_search_form_name(@opt)}'#{@cX.off}
- #{@cX.fuschia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off}
+ #{@cX.fuchsia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off}
- #{@cX.fuschia}NOTE it is first necessary to create the database and tables and populate it#{@cX.off}
+ #{@cX.fuchsia}NOTE it is first necessary to create the database and tables and populate it#{@cX.off}
sisu --sqlite --dropall # removes existing postgresql db & tables
sisu --sqlite --createall -v # creates postgresql db & tables
diff --git a/lib/sisu/v4/composite.rb b/lib/sisu/v4/composite.rb
index c2ba1fe1..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
@@ -191,7 +191,7 @@ module SiSU_Assemble
file[:prepared]
else
cX=SiSU_Screen::Ansi.new(@opt.cmd).cX
- STDERR.puts "\t #{cX.fuschia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuschia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
para
end
else tuned_file << para
@@ -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
@@ -242,7 +242,7 @@ module SiSU_Assemble
@ssm << loadfile
else
cX=SiSU_Screen::Ansi.new(@opt.cmd).cX
- STDERR.puts "\t #{cX.fuschia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuschia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
para
end
end
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/constants.rb b/lib/sisu/v4/constants.rb
index fab3890f..28bb2f49 100644
--- a/lib/sisu/v4/constants.rb
+++ b/lib/sisu/v4/constants.rb
@@ -310,13 +310,7 @@ DEVELOPER={
maintenance: :false,
}
__END__
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).set
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:green)
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia)
-puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__
-puts "#{ANSI_C[:red]} #{__LINE__.to_s} #{ANSI_C[:off]} #{__FILE__}"
-puts ANSI_C[:fuchsia] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:fuchsia]}\\1#{ANSI_C[:off]}")
-puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:red]}\\1#{ANSI_C[:off]}")
+utils.rb
consider:
〔comment〕
〔links?????〕
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 <CreateFile
+ class Rescued <CreateFile
def initialize(error,errorlist,cmd,fns='')
@fns,@cmd,@error,@errorlist=fns,cmd,error,errorlist
@cmd=(cmd \
@@ -70,7 +70,7 @@ module SiSU_Errors
? 'Vc'
: 'V'
end
- def error
+ def location
file=@fns \
? (SiSU_Env::CreateFile.new(@fns).file_error)
: (File.new('/tmp/errorlog.sisu','w+'))
diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb
index d4987c4d..1dda9aae 100644
--- a/lib/sisu/v4/html.rb
+++ b/lib/sisu/v4/html.rb
@@ -124,7 +124,7 @@ module SiSU_HTML
SiSU_HTML::Source::Output.new(scroll,@md).scroll
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
@@ -269,7 +269,7 @@ module SiSU_HTML
@@toc[:seg_mini] << toc[:seg_mini] if toc[:seg_mini]
@@toc[:scr] << toc[:scr] if toc[:scr]
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
@@ -661,7 +661,7 @@ WOK
end
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
@@ -683,7 +683,7 @@ WOK
end
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/html_scroll.rb b/lib/sisu/v4/html_scroll.rb
index d167dc57..367e7d70 100644
--- a/lib/sisu/v4/html_scroll.rb
+++ b/lib/sisu/v4/html_scroll.rb
@@ -75,7 +75,7 @@ module SiSU_HTML_Scroll
scr[:tails]=SiSU_HTML_Scroll::Scroll.new(@md).tails
scr
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/html_segments.rb b/lib/sisu/v4/html_segments.rb
index ac3cebac..73386381 100644
--- a/lib/sisu/v4/html_segments.rb
+++ b/lib/sisu/v4/html_segments.rb
@@ -176,7 +176,7 @@ module SiSU_HTML_Seg
SiSU_HTML_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/html_tune.rb b/lib/sisu/v4/html_tune.rb
index 84100c9c..1876380a 100644
--- a/lib/sisu/v4/html_tune.rb
+++ b/lib/sisu/v4/html_tune.rb
@@ -134,7 +134,7 @@ module SiSU_HTML_Tune
end
SiSU_HTML_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/hub.rb b/lib/sisu/v4/hub.rb
index 72ed5a6b..5f80e795 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -186,22 +186,22 @@ module SiSU
@@n_do=0
end
def remote_put_base_site_rsync # -CR
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).rsync_base
end
def remote_put_base_site_rsync_match # -CCRZ
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).rsync_base_sync
end
def remote_put_base_site # -Cr
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).scp_base
end
def remote_put_base_site_all # -CCr
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).scp_base_all
end
@@ -221,10 +221,10 @@ module SiSU
SiSU_Webserv::WebrickStart.new
end
def not_found
- puts "\n#{@cX.fuschia}FILE NOT FOUND:#{@cX.off} << #{@opt.fns} >> - requested #{@opt.cmd} processing skipped\n"
+ puts "\n#{@cX.fuchsia}FILE NOT FOUND:#{@cX.off} << #{@opt.fns} >> - requested #{@opt.cmd} processing skipped\n"
end
def convert_name_message(fns,type,i,o,rune)
- %{\nIn filename: "#{@cX.fuschia}#{fns}#{@cX.off}" << #{type} >> #{@cX.fuschia}is apre 0.36 markup filename.#{@cX.off} #{@cX.brown}Please rename your file.#{@cX.off}\n\tAs of sisu-0.37, SiSU markup files with #{@cX.brown}the extensions #{i} should be re-named #{o}#{@cX.off}\n\tif you have the program called 'rename' installed, the following rune should do the trick:\n\t\t#{rune}\n\talternatively try:\n\t\tsisu --convert --36to37 #{fns}\n\trequested #{@opt.cmd} processing skipped\n}
+ %{\nIn filename: "#{@cX.fuchsia}#{fns}#{@cX.off}" << #{type} >> #{@cX.fuchsia}is apre 0.36 markup filename.#{@cX.off} #{@cX.brown}Please rename your file.#{@cX.off}\n\tAs of sisu-0.37, SiSU markup files with #{@cX.brown}the extensions #{i} should be re-named #{o}#{@cX.off}\n\tif you have the program called 'rename' installed, the following rune should do the trick:\n\t\t#{rune}\n\talternatively try:\n\t\tsisu --convert --36to37 #{fns}\n\trequested #{@opt.cmd} processing skipped\n}
end
def not_recognised
case @opt.fns
@@ -238,9 +238,9 @@ module SiSU
puts convert_name_message(@opt.fns,type,'.r1 .r2 and .r3','.sst',rune)
puts %{\n\tNote also that you will need to change the names of the files called/required\n\twithin the document text to build the composite document\n\t\t.s1 .s2 .s3 should be .sst \n\t\t.si should be .ssi\n\trequested #{@opt.cmd} processing skipped\n}
when /(\.ssi)$/
- puts "\n#{@cX.fuschia}component filetype:#{@cX.off} << #{@opt.fns} >> - is not a processed filetype, (it may be used as a component of a .ssm markup file)\n\trequested #{@opt.cmd} processing skipped\n"
+ puts "\n#{@cX.fuchsia}component filetype:#{@cX.off} << #{@opt.fns} >> - is not a processed filetype, (it may be used as a component of a .ssm markup file)\n\trequested #{@opt.cmd} processing skipped\n"
else
- puts "\n#{@cX.fuschia}FILETYPE NOT RECOGNISED:#{@cX.off} << #{@opt.fns} >> - is not a recognized filetype,\n\trequested #{@opt.cmd} processing skipped\n"
+ puts "\n#{@cX.fuchsia}FILETYPE NOT RECOGNISED:#{@cX.off} << #{@opt.fns} >> - is not a recognized filetype,\n\trequested #{@opt.cmd} processing skipped\n"
end
end
end
@@ -597,7 +597,7 @@ module SiSU
SiSU_Remote::Get.new(@opt,@get_p).sisupod
end
rescue
- SiSU_Errors::InfoError.new($!,$@,@opt,@fns).error do
+ SiSU_Errors::Rescued.new($!,$@,@opt,@fns).location do
__LINE__.to_s + ':' + __FILE__
end
@retry_count +=1
@@ -691,7 +691,7 @@ module SiSU
elsif action_on_file_ == :true \
and @opt.files.length == 0
STDERR.puts %{requested action requires valid sisu markup file [filename (.sst .ssm)] or wildcard (that includes a valid filename)}
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia) if @opt.cmd =~/[MV]/
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:fuchsia) if @opt.cmd =~/[MV]/
end
elsif @opt.mod.inspect =~/--query/
require_relative 'sst_identify_markup' # sst_identify_markup.rb
diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb
index ba5a0556..eb888387 100644
--- a/lib/sisu/v4/manifest.rb
+++ b/lib/sisu/v4/manifest.rb
@@ -96,7 +96,7 @@ module SiSU_Manifest
data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
SiSU_Manifest::Source::Output.new(@md).check_output(data)
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
@@ -917,7 +917,7 @@ WOK
WOK
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/manpage.rb b/lib/sisu/v4/manpage.rb
index c3e0bbfb..fd4e365d 100644
--- a/lib/sisu/v4/manpage.rb
+++ b/lib/sisu/v4/manpage.rb
@@ -96,7 +96,7 @@ module SiSU_Manpage
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
SiSU_Manpage::Source::Scroll.new(@md,@dal_array).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/odf.rb b/lib/sisu/v4/odf.rb
index 5350f5a7..acc44ab3 100644
--- a/lib/sisu/v4/odf.rb
+++ b/lib/sisu/v4/odf.rb
@@ -93,7 +93,7 @@ module SiSU_ODF
end
SiSU_ODF::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/param.rb b/lib/sisu/v4/param.rb
index ed70c9c4..86dd6a01 100644
--- a/lib/sisu/v4/param.rb
+++ b/lib/sisu/v4/param.rb
@@ -849,7 +849,7 @@ module SiSU_Param
Dir.chdir(@opt.f_pth[:pth])
begin
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
@@ -1408,7 +1408,7 @@ module SiSU_Param
end
@@md=@md=nil
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/particulars.rb b/lib/sisu/v4/particulars.rb
index b7ea2f3a..f7979197 100644
--- a/lib/sisu/v4/particulars.rb
+++ b/lib/sisu/v4/particulars.rb
@@ -122,7 +122,7 @@ module SiSU_Particulars
@md=SiSU_Param::Parameters.new(opt).get
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -133,7 +133,7 @@ module SiSU_Particulars
@env=SiSU_Env::InfoEnv.new(opt.fns)
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -144,7 +144,7 @@ module SiSU_Particulars
@file=SiSU_Env::FileOp.new(@md)
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -155,7 +155,7 @@ module SiSU_Particulars
@dal_array=SiSU_DAL::Source.new(opt).get
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -165,7 +165,7 @@ module SiSU_Particulars
@sst_idx=SiSU_DAL::Source.new(opt).get_idx_sst
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -175,7 +175,7 @@ module SiSU_Particulars
@raw_idx=SiSU_DAL::Source.new(opt).get_idx_raw
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -185,7 +185,7 @@ module SiSU_Particulars
@html_idx=SiSU_DAL::Source.new(opt).get_idx_html
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -195,7 +195,7 @@ module SiSU_Particulars
@xhtml_idx=SiSU_DAL::Source.new(opt).get_idx_xhtml
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -208,11 +208,11 @@ module SiSU_Particulars
self
rescue
if @md
- SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
else
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
@@ -224,7 +224,7 @@ module SiSU_Particulars
@ocn_htmlseg_map=SiSU_DAL::Source.new(@md).get_map_ocn_htmlseg
self
rescue
- SiSU_Errors::InfoError.new($!,$@,opt.cmd,opt.fnl).error do
+ SiSU_Errors::Rescued.new($!,$@,opt.cmd,opt.fnl).location do
__LINE__.to_s + ':' + __FILE__
end
end
diff --git a/lib/sisu/v4/plaintext.rb b/lib/sisu/v4/plaintext.rb
index 09168466..13e93e9a 100644
--- a/lib/sisu/v4/plaintext.rb
+++ b/lib/sisu/v4/plaintext.rb
@@ -104,7 +104,7 @@ module SiSU_Plaintext
#wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
SiSU_Plaintext::Source::Scroll.new(md,dal_array,wrap_width).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/po4a.rb b/lib/sisu/v4/po4a.rb
index 83aa8d5b..5a74a7d0 100644
--- a/lib/sisu/v4/po4a.rb
+++ b/lib/sisu/v4/po4a.rb
@@ -154,7 +154,7 @@ module SiSU_Po4a
SiSU_Po4a::Source::Scroll.new(fn,@dal_array_lang_src,@dal_array_lang_translation,@@md_src,@@md_trn,wrap_width).songsheet
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
diff --git a/lib/sisu/v4/qrcode.rb b/lib/sisu/v4/qrcode.rb
index 3b8cc404..a36d8973 100644
--- a/lib/sisu/v4/qrcode.rb
+++ b/lib/sisu/v4/qrcode.rb
@@ -93,7 +93,7 @@ module SiSU_QRcode
data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
OutputInfo.new(@md).check_output(data)
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
@@ -714,7 +714,7 @@ WOK
output_metadata
output_metadata_short
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/rexml.rb b/lib/sisu/v4/rexml.rb
index 3e710be2..b89fada7 100644
--- a/lib/sisu/v4/rexml.rb
+++ b/lib/sisu/v4/rexml.rb
@@ -102,11 +102,11 @@ module SiSU_Rexml
end
end
else
- SiSU_Screen::Ansi.new(@md.opt.cmd,'fuschia',"File Not Found #{xmlfile}",'requested XML processing skipped').colorize unless @md.opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.opt.cmd,'fuchsia',"File Not Found #{xmlfile}",'requested XML processing skipped').colorize unless @md.opt.cmd =~/q/
exit
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/screen_text_color.rb b/lib/sisu/v4/screen_text_color.rb
index 86b41e6b..ea9ae24d 100644
--- a/lib/sisu/v4/screen_text_color.rb
+++ b/lib/sisu/v4/screen_text_color.rb
@@ -61,7 +61,7 @@
=end
module SiSU_Screen
class Color
- attr_accessor :off,:marker,:bold,:underline,:invert,:darkgrey_hi,:grey_hi,:pink_hi,:fuschia_hi,:red_hi,:orange_hi,:yellow_hi,:brown_hi,:lightgreen_hi,:green_hi,:cyan_hi,:blue_hi,:navy_hi,:white,:white_bold,:grey,:pink,:fuschia,:ruby,:red,:orange,:yellow,:brown,:green,:darkgreen,:cyan,:blue,:navy,:black
+ attr_accessor :off,:marker,:bold,:underline,:invert,:darkgrey_hi,:grey_hi,:pink_hi,:fuchsia_hi,:red_hi,:orange_hi,:yellow_hi,:brown_hi,:lightgreen_hi,:green_hi,:cyan_hi,:blue_hi,:navy_hi,:white,:white_bold,:grey,:pink,:fuchsia,:ruby,:red,:orange,:yellow,:brown,:green,:darkgreen,:cyan,:blue,:navy,:black
def initialize(&block)
instance_eval &block
end
@@ -83,7 +83,7 @@ module SiSU_Screen
end
@cX=@@cX= unless @use_color
Color.new do
- self.off=self.white=self.white_bold=self.marker=self.bold=self.underline=self.invert=self.darkgrey_hi=self.grey_hi=self.pink_hi=self.fuschia_hi=self.red_hi=self.orange_hi=self.yellow_hi=self.brown_hi=self.lightgreen_hi=self.green_hi=self.cyan_hi=self.blue_hi=self.navy_hi=self.grey=self.pink=self.fuschia=self.ruby=self.red=self.orange=self.yellow=self.brown=self.green=self.darkgreen=self.cyan=self.blue=self.navy=self.black=''
+ self.off=self.white=self.white_bold=self.marker=self.bold=self.underline=self.invert=self.darkgrey_hi=self.grey_hi=self.pink_hi=self.fuchsia_hi=self.red_hi=self.orange_hi=self.yellow_hi=self.brown_hi=self.lightgreen_hi=self.green_hi=self.cyan_hi=self.blue_hi=self.navy_hi=self.grey=self.pink=self.fuchsia=self.ruby=self.red=self.orange=self.yellow=self.brown=self.green=self.darkgreen=self.cyan=self.blue=self.navy=self.black=''
end
else #default set to colors on
Color.new do
@@ -97,7 +97,7 @@ module SiSU_Screen
self.darkgrey_hi = "\033[100m"
self.grey_hi = "\033[47m"
self.pink_hi = "\033[105m"
- self.fuschia_hi = "\033[45m"
+ self.fuchsia_hi = "\033[45m"
self.red_hi = "\033[41m"
self.orange_hi = "\033[101m"
self.yellow_hi = "\033[103m"
@@ -109,7 +109,7 @@ module SiSU_Screen
self.navy_hi = "\033[44m"
self.grey = "\033[90m"
self.pink = "\033[95m"
- self.fuschia = "\033[35m"
+ self.fuchsia = "\033[35m"
self.ruby = "\033[31m"
self.red = "\033[91m" #check
self.orange = "\033[91m"
@@ -134,7 +134,7 @@ module SiSU_Screen
when /darkgrey_hi/; @cX.darkgrey_hi
when /grey_hi/; @cX.grey_hi
when /pink_hi/; @cX.pink_hi
- when /fuschia_hi/; @cX.fuschia_hi
+ when /fuchsia_hi/; @cX.fuchsia_hi
when /red_hi/; @cX.red_hi
when /orange_hi/; @cX.orange_hi
when /yellow_hi/; @cX.yellow_hi
@@ -147,7 +147,7 @@ module SiSU_Screen
when /white/; @cX.white
when /grey/; @cX.grey
when /pink/; @cX.pink
- when /fuschia/; @cX.fuschia
+ when /fuchsia/; @cX.fuchsia
when /ruby/; @cX.ruby
when /red/; @cX.red
when /orange/; @cX.orange
@@ -168,7 +168,7 @@ module SiSU_Screen
when /darkgrey_hi/; puts "#{@cX.darkgrey_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /grey_hi/; puts "#{@cX.grey_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /pink_hi/; puts "#{@cX.pink_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
- when /fuschia_hi/; puts "#{@cX.fuschia_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
+ when /fuchsia_hi/; puts "#{@cX.fuchsia_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /red_hi/; puts "#{@cX.red_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /orange_hi/; puts "#{@cX.orange_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /yellow_hi/; puts "#{@cX.yellow_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
@@ -182,7 +182,7 @@ module SiSU_Screen
when /white/; puts "#{@cX.off}#{@txt[1]} #{@txt[2]}"
when /grey/; puts "#{@cX.grey}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /pink/; puts "#{@cX.pink}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
- when /fuschia/; puts "#{@cX.fuschia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
+ when /fuchsia/; puts "#{@cX.fuchsia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /ruby/; puts "#{@cX.ruby}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /red/; puts "#{@cX.red}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /orange/; puts "#{@cX.orange}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
@@ -204,16 +204,16 @@ module SiSU_Screen
def sisu
end
def rescue
- STDERR.puts %{\t #{@cX.orange}Rescued#{@cX.off} #{@cX.grey}#{yield if block_given?}\n\t An#{@cX.off} #{@cX.fuschia}ERROR#{@cX.off} #{@cX.grey}occurred, message:#{@cX.off} #{@cX.fuschia}#{@txt[0]}#{@cX.off} #{@cX.grey}#{@txt[1]}#{@cX.off} #{@cX.brown}#{@txt[2]}#{@cX.off}}
+ STDERR.puts %{\t #{@cX.orange}Rescued#{@cX.off} #{@cX.grey}#{yield if block_given?}\n\t An#{@cX.off} #{@cX.fuchsia}ERROR#{@cX.off} #{@cX.grey}occurred, message:#{@cX.off} #{@cX.fuchsia}#{@txt[0]}#{@cX.off} #{@cX.grey}#{@txt[1]}#{@cX.off} #{@cX.brown}#{@txt[2]}#{@cX.off}}
end
def warn
STDERR.puts "\t #{@cX.brown}#{@txt[0]}#{@cX.off} #{@cX.grey}#{@txt[1]}#{@cX.off}"
end
def error
- STDERR.puts "\t #{@cX.fuschia}#{@txt[0]}#{@cX.off} #{@cX.brown}#{@txt[1]}#{@cX.off}"
+ STDERR.puts "\t #{@cX.fuchsia}#{@txt[0]}#{@cX.off} #{@cX.brown}#{@txt[1]}#{@cX.off}"
end
def error2
- STDERR.puts "\t #{@cX.grey}#{@txt[0]}#{@cX.off} #{@cX.fuschia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
+ STDERR.puts "\t #{@cX.grey}#{@txt[0]}#{@cX.off} #{@cX.fuchsia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
end
def version
puts "#{@cX.blue_hi}#{@txt[0]} #{@txt[1]}#{@cX.off} #{@cX.grey} (#{@txt[3]} [#{@txt[2]}]) &#{@cX.off} #{@cX.ruby}Ruby#{@cX.off} #{@cX.grey}(#{@txt[4]})#{@cX.off}\n"
@@ -421,7 +421,7 @@ __END__
self.darkgrey_hi = "\033[100m"
self.grey_hi = "\033[47m"
self.pink_hi = "\033[105m"
- self.fuschia_hi = "\033[45m"
+ self.fuchsia_hi = "\033[45m"
self.red_hi = "\033[41m"
self.orange_hi = "\033[101m"
self.yellow_hi = "\033[103m"
@@ -433,7 +433,7 @@ __END__
self.navy_hi = "\033[44m"
self.grey = "\033[90m"
self.pink = "\033[95m"
- self.fuschia = "\033[35m"
+ self.fuchsia = "\033[35m"
self.ruby = "\033[31m"
self.red = "\033[91m" #check
self.orange = "\033[91m"
@@ -457,7 +457,7 @@ __END__
self.darkgrey_hi = "\033[100m"
self.grey_hi = "\033[47m"
self.pink_hi = "\033[105m"
- self.fuschia_hi = "\033[45m"
+ self.fuchsia_hi = "\033[45m"
self.red_hi = "\033[41m"
self.orange_hi = "\033[101m"
self.yellow_hi = "\033[103m"
@@ -469,7 +469,7 @@ __END__
self.navy_hi = "\033[44m"
self.grey = "\033[90m"
self.pink = "\033[95m"
- self.fuschia = "\033[35m"
+ self.fuchsia = "\033[35m"
self.ruby = "\033[31m"
self.red = "\033[31m" #check
self.orange = "\033[91m"
diff --git a/lib/sisu/v4/sitemaps.rb b/lib/sisu/v4/sitemaps.rb
index f3521dc9..194f1220 100644
--- a/lib/sisu/v4/sitemaps.rb
+++ b/lib/sisu/v4/sitemaps.rb
@@ -94,7 +94,7 @@ module SiSU_Sitemaps
SiSU_Screen::Ansi.new(@opt.cmd,"sitemap index:","#{@env.path.output}/#{@sitemap_idx_fn}").result unless @opt.cmd =~/q/
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
diff --git a/lib/sisu/v4/sst_do_inline_footnotes.rb b/lib/sisu/v4/sst_do_inline_footnotes.rb
index d7b40cd7..b65c99af 100644
--- a/lib/sisu/v4/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v4/sst_do_inline_footnotes.rb
@@ -96,7 +96,7 @@ module SiSU_ConvertFootnotes
@@fns=@opt.fns
create_dal
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
@@ -114,7 +114,7 @@ module SiSU_ConvertFootnotes
? read_fnm
: @@dal_array.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
diff --git a/lib/sisu/v4/sst_to_s_xml_sax.rb b/lib/sisu/v4/sst_to_s_xml_sax.rb
index 5b8febf0..bbf81c5a 100644
--- a/lib/sisu/v4/sst_to_s_xml_sax.rb
+++ b/lib/sisu/v4/sst_to_s_xml_sax.rb
@@ -99,7 +99,7 @@ module SiSU_SimpleXML_ModelSax
end
SiSU_SimpleXML_ModelSax::Convert::Songsheet.new(@fns_array,@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 #file closed in songsheet
@@ -123,7 +123,7 @@ module SiSU_SimpleXML_ModelSax
SiSU_SimpleXML_ModelSax::Convert::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
SiSU_Rexml::Rexml.new(@md,@md.fn[:sxs]).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
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/sysenv.rb b/lib/sisu/v4/sysenv.rb
index 32e38ac6..cfbbc0c1 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -1097,8 +1097,7 @@ module SiSU_Env
elsif output_dir_structure.by_filename?
''
else
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuschia)
- puts 'set output type, by: language, filetype or filename'
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('set output type, by: language, filetype or filename')
end
@stub_set_manifest=stub + '/manifest'
end
diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb
index c69067aa..3d226533 100644
--- a/lib/sisu/v4/texpdf.rb
+++ b/lib/sisu/v4/texpdf.rb
@@ -98,7 +98,7 @@ module SiSU_TeX
Dir.mkdir(@env.processing_path.tex) unless FileTest.directory?(@env.processing_path.tex)
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
@@ -131,7 +131,7 @@ module SiSU_TeX
SiSU_TeX::Source::LaTeXtoPdf.new(@md,@particulars.env).latexrun_selective
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
@@ -209,7 +209,7 @@ module SiSU_TeX
FileUtils::cp(portrait_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_p}")
FileUtils::rm(portrait_pdf)
else
- STDERR.puts "#{cX.fuschia}pdf file not generated#{cX.off} <#{cX.blue}#{portrait_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')}#{cX.off}> (check texlive dependencies)"
+ STDERR.puts "#{cX.fuchsia}pdf file not generated#{cX.off} <#{cX.blue}#{portrait_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')}#{cX.off}> (check texlive dependencies)"
STDERR.puts "#{__FILE__}:#{__LINE__} NOT FOUND: #{portrait_pdf}" if @md.opt.cmd.inspect =~/M/
end
end
@@ -218,7 +218,7 @@ module SiSU_TeX
FileUtils::cp(landscape_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_l}")
FileUtils::rm(landscape_pdf)
else
- STDERR.puts "#{cX.fuschia}pdf file not generated#{cX.off} <#{cX.blue}#{landscape_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')}#{cX.off}> (check texlive dependencies)"
+ STDERR.puts "#{cX.fuchsia}pdf file not generated#{cX.off} <#{cX.blue}#{landscape_pdf.gsub(/.+?([^\/]+?\.pdf)$/,'\1')}#{cX.off}> (check texlive dependencies)"
STDERR.puts "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.opt.cmd.inspect =~/M/
end
end
@@ -246,8 +246,7 @@ module SiSU_TeX
and File.size(texfile) > 0
#@tex_f_no+=1
else
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia)
- puts "\tzero file size #{@env.processing_path.tex}/#{texfile}"
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark("\tzero file size #{@env.processing_path.tex}/#{texfile}")
end
end
end
@@ -297,7 +296,7 @@ module SiSU_TeX
lst=Dir["*.{aux,log,out}"]
lst.each {|file| File.unlink(file)} if lst
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
@@ -342,8 +341,7 @@ module SiSU_TeX
elsif @md.opt.act[:pdf_p][:set]==:on
'pdfTex portrait'
else
- puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia)
- 'error: neither landscape nor portrait'
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('error: neither landscape nor portrait')
end
SiSU_Screen::Ansi.new(@md.opt.cmd,txt_gen).txt_grey if @md.opt.cmd=~/[MVvz]/
if defined? @md.rights.all \
@@ -372,7 +370,7 @@ module SiSU_TeX
data=markup(data)
output(data)
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/update.rb b/lib/sisu/v4/update.rb
index e5b9a504..1d7e1cff 100644
--- a/lib/sisu/v4/update.rb
+++ b/lib/sisu/v4/update.rb
@@ -76,7 +76,7 @@ module SiSU_UpdateControlFlag
SiSU_Screen::Ansi.new(@md.opt.cmd,'Checking previous output',base_path).green_hi_blue unless @md.opt.cmd =~/q/
SetCF.new(@md).set_flags
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/urls.rb b/lib/sisu/v4/urls.rb
index f0293a40..af586c52 100644
--- a/lib/sisu/v4/urls.rb
+++ b/lib/sisu/v4/urls.rb
@@ -73,7 +73,7 @@ module SiSU_Urls
begin
SiSU_Urls::OutputUrls.new(@opt).songsheet if @opt.fnb
rescue
- SiSU_Errors::InfoError.new($!,$@,@opt.cmd).error do
+ SiSU_Errors::Rescued.new($!,$@,@opt.cmd).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -126,7 +126,7 @@ module SiSU_Urls
begin
@opt.cmd=~/U/ ? urls_all : (urls_select unless @opt.cmd=~/q/)
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/utils.rb b/lib/sisu/v4/utils.rb
index 134fbc21..b120cc01 100644
--- a/lib/sisu/v4/utils.rb
+++ b/lib/sisu/v4/utils.rb
@@ -92,15 +92,39 @@ module SiSU_Utils
#ansi_color + @line.to_s + ansi_color_off + ' ' + @file.gsub(/([^\/]+$)/,"#{ansi_color}\\1#{ansi_color_off}")
c
end
- def set(color=nil)
- c=ansi(color)
+ def var(v,x)
+ h={ c: nil, m: '' }
+ if v.class == Hash
+ h[:c] = (defined? v[:c]) ? v[:c] : ''
+ h[:m] = (defined? v[:m]) ? v[:m] : ''
+ else
+ if v.class == Symbol
+ h[:c]=v
+ elsif v.class == String
+ h[:m]=v
+ end
+ if x.class == Symbol
+ h[:c]=x
+ elsif x.class == String
+ h[:m]=x
+ end
+ h[:c] = (defined? h[:c]) ? h[:c] : ''
+ h[:m] = (defined? h[:m]) ? h[:m] : ''
+ end
+ h[:c]=ansi(h[:c])
+ h[:m]=message(h[:m])
+ h
+ end
+ def message(msg='')
+ @message=(msg.empty?) ? '' : " #{msg}"
+ end
+ def set(v=nil,x=nil)
+ v=var(v,x)
file,path=File.basename(@file),File.dirname(@file)
- c[:on] + @line + c[:off] + ' ' + path + '/' "#{c[:on]}#{file}#{c[:off]}"
+ v[:c][:on] + @line + v[:c][:off] + ' ' + path + '/' "#{v[:c][:on]}#{file}#{v[:c][:off]}" + v[:m]
end
- def set_(color=nil)
- c=ansi(color)
- c[:on] + @line + c[:off] + ' ' +
- @file.gsub(/([^\/]+$)/,"#{c[:on]}\\1#{c[:off]}")
+ def mark(v=nil,x=nil)
+ puts set(v,x)
end
end
class Path
@@ -116,9 +140,29 @@ module SiSU_Utils
end
end
__END__
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:red)
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:green)
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:inv_red)
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark({ m: %{
+ code: #{@@flag[:code]}, <-- close "#{t_o}"
+}})
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark({ m: %{
+ code: #{@@flag['code']}, <-- close "#{t_o}"
+}, c: :green})
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark({ m: %{
+ code: #{@@flag['code']}, open --> "#{t_o}"
+}}) if t_o=~/^```/m
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark(%{ code: #{@@flag['code']}, open --> "#{t_o}" }) \
+if t_o=~/^```/m
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->",:green)
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:green,"open -->")
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->")
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:green)
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark("open -->")
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark('open -->',:green)
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).mark
puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).set
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).set
-puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:inv_red).set
+puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set('',:green)
+puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set('',:fuchsia)
+puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__
+puts "#{ANSI_C[:red]} #{__LINE__.to_s} #{ANSI_C[:off]} #{__FILE__}"
+puts ANSI_C[:fuchsia] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:fuchsia]}\\1#{ANSI_C[:off]}")
+puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:red]}\\1#{ANSI_C[:off]}")
diff --git a/lib/sisu/v4/webrick.rb b/lib/sisu/v4/webrick.rb
index 1b1b6bd8..15e86d87 100644
--- a/lib/sisu/v4/webrick.rb
+++ b/lib/sisu/v4/webrick.rb
@@ -151,7 +151,7 @@ WOK
brick(@port,get)
rescue
require_relative 'sysenv' # sysenv.rb
- SiSU_Errors::InfoError.new($!,$@,'-W',nil).error do #fix
+ SiSU_Errors::Rescued.new($!,$@,'-W',nil).location do #fix
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -176,7 +176,7 @@ WOK
trap("INT"){ s.shutdown }
s.start
rescue
- SiSU_Errors::InfoError.new($!,$@,'-W',nil).error do #fix
+ SiSU_Errors::Rescued.new($!,$@,'-W',nil).location do #fix
__LINE__.to_s + ':' + __FILE__
end
ensure
diff --git a/lib/sisu/v4/wikispeak.rb b/lib/sisu/v4/wikispeak.rb
index 9e171367..fa2d9ddb 100644
--- a/lib/sisu/v4/wikispeak.rb
+++ b/lib/sisu/v4/wikispeak.rb
@@ -88,7 +88,7 @@ module SiSU_Wikispeak
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
SiSU_Wikispeak::Source::Scroll.new(@dal_array,@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
diff --git a/lib/sisu/v4/xhtml.rb b/lib/sisu/v4/xhtml.rb
index a62c942f..c4c708ef 100644
--- a/lib/sisu/v4/xhtml.rb
+++ b/lib/sisu/v4/xhtml.rb
@@ -97,7 +97,7 @@ module SiSU_XHTML
end
SiSU_XHTML::Source::Songsheet.new(@particulars).song
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
@@ -116,7 +116,7 @@ module SiSU_XHTML
SiSU_XHTML::Source::Tidy.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
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/xml.rb b/lib/sisu/v4/xml.rb
index 3599734c..106b1ed3 100644
--- a/lib/sisu/v4/xml.rb
+++ b/lib/sisu/v4/xml.rb
@@ -95,7 +95,7 @@ module SiSU_XML_SAX
end
SiSU_XML_SAX::Source::Songsheet.new(@particulars).song
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
@@ -115,7 +115,7 @@ module SiSU_XML_SAX
SiSU_XML_SAX::Source::Tidy.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
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/xml_dom.rb b/lib/sisu/v4/xml_dom.rb
index 8660dbf3..057f8532 100644
--- a/lib/sisu/v4/xml_dom.rb
+++ b/lib/sisu/v4/xml_dom.rb
@@ -96,7 +96,7 @@ module SiSU_XML_DOM
end
SiSU_XML_DOM::Source::Songsheet.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
@@ -115,7 +115,7 @@ module SiSU_XML_DOM
SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
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/xml_fictionbook.rb b/lib/sisu/v4/xml_fictionbook.rb
index dcf11fc0..119f7d78 100644
--- a/lib/sisu/v4/xml_fictionbook.rb
+++ b/lib/sisu/v4/xml_fictionbook.rb
@@ -79,7 +79,7 @@ module SiSU_XML_Fictionbook
@dal_array=SiSU_DAL::Source.new(@opt).get
SiSU_XML_Fictionbook::Source::Scroll.new(@dal_array,@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
diff --git a/lib/sisu/v4/xml_scaffold.rb b/lib/sisu/v4/xml_scaffold.rb
index 98792017..0608a17f 100644
--- a/lib/sisu/v4/xml_scaffold.rb
+++ b/lib/sisu/v4/xml_scaffold.rb
@@ -76,7 +76,7 @@ module SiSU_XML_Scaffold
@md,@dal_array=@particulars.md,@particulars.dal_array
SiSU_XML_Scaffold::Source::Scroll.new(@dal_array,@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