Exception: CitySDK::Exception
- Inherits:
-
Exception
- Object
- Exception
- CitySDK::Exception
- Defined in:
- lib/citysdk/util.rb
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.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/citysdk/util.rb', line 10 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 |