diff options
-rw-r--r-- | lib/edoors/link.rb | 2 | ||||
-rw-r--r-- | lib/edoors/particle.rb | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/edoors/link.rb b/lib/edoors/link.rb index 8676979..ede2cd4 100644 --- a/lib/edoors/link.rb +++ b/lib/edoors/link.rb @@ -64,6 +64,8 @@ module Edoors # # @param [Hash] o belongs to JSON parser # + # @raise Edoors::Exception if the json kls attribute is wrong + # def self.json_create o raise Edoors::Exception.new "JSON #{o['kls']} != #{self.name}" if o['kls'] != self.name self.new o['src'], o['dsts'], o['keys'], o['value'] diff --git a/lib/edoors/particle.rb b/lib/edoors/particle.rb index 983af01..c7244d0 100644 --- a/lib/edoors/particle.rb +++ b/lib/edoors/particle.rb @@ -104,6 +104,8 @@ module Edoors # # @param [Hash] o belongs to JSON parser # + # @raise Edoors::Exception if the json kls attribute is wrong + # def self.json_create o raise Edoors::Exception.new "JSON #{o['kls']} != #{self.name}" if o['kls'] != self.name self.new o @@ -151,6 +153,8 @@ module Edoors # # @param [Array] dsts destinations to add # + # @raise Edoors::Exception if a destination is not acceptable + # # The parameters are checked before beeing added. # they must not be empty or be '?' or start with '/' # or contain '/?' or '//' or '\s+' |