lib/usps_flags/errors.rb in usps_flags-0.5.0 vs lib/usps_flags/errors.rb in usps_flags-0.5.1
- old
+ new
@@ -1,40 +1,42 @@
# frozen_string_literal: false
# Custom errors.
#
# @private
-module USPSFlags::Errors
- class PNGGenerationError < StandardError
- attr_reader :svg
+class USPSFlags
+ class Errors
+ class PNGGenerationError < StandardError
+ attr_reader :svg
- def initialize(msg = 'There was an error generating the PNG file.', svg: '')
- super(msg)
- @svg = svg
+ def initialize(msg = 'There was an error generating the PNG file.', svg: '')
+ super(msg)
+ @svg = svg
+ end
end
- end
- class PNGConversionError < StandardError
- def initialize(msg = 'There was an error converting the PNG file.')
- super(msg)
+ class PNGConversionError < StandardError
+ def initialize(msg = 'There was an error converting the PNG file.')
+ super(msg)
+ end
end
- end
- class StaticFilesGenerationError < StandardError
- attr_reader :cause
+ class StaticFilesGenerationError < StandardError
+ attr_reader :cause
- def initialize(msg = 'There was an error generating the static files.', cause: nil)
- super(msg)
- @cause = cause
+ def initialize(msg = 'There was an error generating the static files.', cause: nil)
+ super(msg)
+ @cause = cause
+ end
end
- end
- class ZipGenerationError < StandardError
- attr_reader :type, :cause
+ class ZipGenerationError < StandardError
+ attr_reader :type, :cause
- def initialize(msg = 'There was an error generating the zip file.', type: nil, cause: nil)
- super(msg)
- @type = type
- @cause = cause
+ def initialize(msg = 'There was an error generating the zip file.', type: nil, cause: nil)
+ super(msg)
+ @type = type
+ @cause = cause
+ end
end
end
end