Exception: CitySDK::Exception
Instance Method Summary collapse
-
#initialize(message, parms = nil, srcfile = nil, srcline = nil) ⇒ Exception
constructor
A new instance of Exception.
Constructor Details
#initialize(message, parms = nil, srcfile = nil, srcline = nil) ⇒ Exception
Returns a new instance of Exception.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/citysdk/util.rb', line 50 def initialize(,parms=nil,srcfile=nil,srcline=nil) if parms and srcfile and srcline file = File.basename( parms[:originalfile] ? parms[:originalfile] : ( parms[:file_path] || '-' ) ) m = "#{Time.now.strftime("%b %M %Y, %H:%M")}; CitySDK, processing file: #{file}\n Exception in #{File.basename(srcfile)}, #{srcline}\n #{}" else m = "#{Time.now.strftime("%b %M %Y, %H:%M")}; CitySDK Exception: #{}" end super(m) $stderr.puts(m) if parms and parms[:verbose] end |