Class: RIO::State::Error
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#msg ⇒ Object
Returns the value of attribute msg.
-
#obj ⇒ Object
Returns the value of attribute obj.
-
#sym ⇒ Object
Returns the value of attribute sym.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#==, #===, #=~, #base_state, #became, #become, #callstr, #clone_rio, default_cx, #ensure_cmd_rio, #ensure_rio, #error, #fs, #gofigure, #hash, #initialize, #initialize_copy, #method_missing_trace_str, new_other, #new_rio, #new_rio_cx, #reset, #retryreset, #softreset, #stream?, #to_a, #to_ary, #to_rl, #to_uri, #to_url, #uri
Methods included from Fwd
#fwd, #fwd_reader, #fwd_readers, #fwd_writer, #fwd_writers
Methods included from ZipFile::Cx
Methods included from RIO::Symantics
#rtn_new, #rtn_reset, #rtn_rio, #rtn_self, #rtn_val
Methods included from Ext::YAML::Cx
#document, #documents, #object, #objects, #skipdocuments, #skipobjects, #yaml, #yaml?, #yamldoc
Methods included from Ext::SplitLines::Cx
#columns, #columns?, #skipcolumns, #splitlines, #splitlines?
Methods included from Ext::CSV::Cx
#columns, #columns?, #csv, #csv?, #fields, #fields?, #headers, #headers?, #skipcolumns, #skipfields
Methods included from Cx::Methods
#+@, #_arg_skip, #_noarg_skip, #a, #a!, #all, #all?, #binmode, #binmode?, #bytes, #bytes_, #closeoncopy, #closeoncopy?, #closeoneof, #closeoneof?, #copying, #copying?, #copying_done, #copying_from, #copying_from?, #copying_from_done, #copying_to, #copying_to?, #copying_to_done, #dir_iter?, #dirs, #enc, #enc?, #enc_opts?, #entries, #ext, #ext?, #ext_enc?, #files, #gzip, #gzip?, #inputmode?, #int_enc?, #line, #line_, #lines, #lines_, make_filter_methods, #mode, #mode?, #noall, #noautoclose, #nocloseoncopy, #nocloseoneof, #noext, #norecurse, #nostreamenum, #nostreamenum?, #nosync, #outputmode?, #r, #r!, #record, #record_, #records, #records_, #recurse, #row, #row_, #rows, #rows_, #skip, #skipdirs, #skipentries, #skipfiles, #skiplines, #skipping?, #skiprecords, #skiprecords_, #skiprows, #split, #stream_iter?, #sync, #sync?, #w, #w!
Constructor Details
This class inherits a constructor from RIO::State::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
35 36 37 38 |
# File 'lib/rio/state/error.rb', line 35 def method_missing(sym,*args,&block) emsg = sprintf("Can't Handle %s[%s].%s(%s)",@obj.class.to_s,@obj.to_s,sym.to_s,args.join(',')) raise Exception::CantHandle.new(@obj,sym,*args),emsg end |
Instance Attribute Details
#msg ⇒ Object
Returns the value of attribute msg.
31 32 33 |
# File 'lib/rio/state/error.rb', line 31 def msg @msg end |
#obj ⇒ Object
Returns the value of attribute obj.
31 32 33 |
# File 'lib/rio/state/error.rb', line 31 def obj @obj end |
#sym ⇒ Object
Returns the value of attribute sym.
31 32 33 |
# File 'lib/rio/state/error.rb', line 31 def sym @sym end |
Class Method Details
.error(emsg, obj, sym, *args) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/rio/state/error.rb', line 39 def self.error(emsg,obj,sym,*args) require 'rio/exception' msg = sprintf("%s[%s].%s(%s)",obj.class.to_s,obj.to_s,sym.to_s,args.join(',')) msg += "\n "+emsg unless emsg.nil? or emsg.empty? new(obj: obj, sym: sym, msg: msg) end |
Instance Method Details
#check? ⇒ Boolean
33 |
# File 'lib/rio/state/error.rb', line 33 def check?() true end |
#when_missing(sym, *args) ⇒ Object
34 |
# File 'lib/rio/state/error.rb', line 34 def when_missing(sym,*args) self end |