Method: App42::Util#throwExceptionIfNullOrBlank
- Defined in:
- lib/util/util.rb
#throwExceptionIfNullOrBlank(obj, name) ⇒ Object
An exception to check whether the object is null or blank.
126 127 128 129 130 131 132 133 |
# File 'lib/util/util.rb', line 126 def throwExceptionIfNullOrBlank(obj,name) obj.kind_of?(String) ? trm = my_strip(obj) : trm = obj raise App42Exception.new(name +" parameter can not be null") if trm==nil raise App42Exception.new(name +" parameter can not be blank") if trm == "" end |