Exception: PackerFiles::Core::SizeException

Inherits:
Error
  • Object
show all
Defined in:
lib/PackerFiles/Core/Exceptions.rb

Overview

The Size Exception is generated when child object sizes are greater than that of Parent objects.

Instance Attribute Summary

Attributes inherited from Error

#message

Instance Method Summary collapse

Constructor Details

#initialize(parent_obj, child_obj) ⇒ SizeException

Constructor.



42
43
44
45
46
47
# File 'lib/PackerFiles/Core/Exceptions.rb', line 42

def initialize(parent_obj, child_obj)
   @super
   parent  = parent_obj.class.name.gsub(/.*::/, '')
   child   = child_obj.class.name.gsub(/.*::/, '')
   self.message = "Sum of #{child} sizes are greater than #{parent} size"
end