lib/simply_serializable.rb in simply_serializable-1.2.2 vs lib/simply_serializable.rb in simply_serializable-1.3.0

- old
+ new

@@ -2,6 +2,24 @@ require "simply_serializable/version" require "simply_serializable/serializer" require "simply_serializable/mixin" -module SimplySerializable; end +module SimplySerializable + class Error < StandardError + attr_reader :type + + def initialize(message, type:) + @type = type + super(message) + end + + class CircularDependencyError < Error + def initialize + super( + 'Circular dependency detected', + type: :circular_dependency + ) + end + end + end +end