lib/sc4ry/exceptions.rb in sc4ry-0.2.0 vs lib/sc4ry/exceptions.rb in sc4ry-0.2.1
- old
+ new
@@ -1,50 +1,44 @@
+# frozen_string_literal: true
+
# Sc4ry module
# @note namespace
module Sc4ry
+ # Sc4ry::Exceptions module
+ # @note namespace
+ module Exceptions
+ # Exception use in {Sc4ry::Circuits} when running circuit {Sc4ry::Circuits::run}
+ class CircuitBreaked < StandardError
+ def initialize(msg = 'Circuit just opened')
+ super(msg)
+ end
+ end
- # Sc4ry::Exceptions module
- # @note namespace
- module Exceptions
+ # Generic Exception use in {Sc4ry::Circuits}
+ class Sc4ryGenericError < StandardError
+ def initialize(msg = '')
+ super(msg)
+ end
+ end
- # Exception use in {Sc4ry::Circuits} when running circuit {Sc4ry::Circuits::run}
- class CircuitBreaked < StandardError
- def initialize(msg="Circuit just opened")
- super(msg)
- end
-
- end
+ # Exception use in {Sc4ry::Store} or/and {Sc4ry::Backend} on data string issues
+ class Sc4ryBackendError < StandardError
+ def initialize(msg = '')
+ super(msg)
+ end
+ end
- # Generic Exception use in {Sc4ry::Circuits}
- class Sc4ryGenericError < StandardError
- def initialize(msg="")
- super(msg)
- end
-
- end
+ # Exception use in {Sc4ry::Notifiers} on notification issues
+ class Sc4ryNotifierError < StandardError
+ def initialize(msg = '')
+ super(msg)
+ end
+ end
- # Exception use in {Sc4ry::Store} or/and {Sc4ry::Backend} on data string issues
- class Sc4ryBackendError < StandardError
- def initialize(msg="")
- super(msg)
- end
-
- end
-
- # Exception use in {Sc4ry::Notifiers} on notification issues
- class Sc4ryNotifierError < StandardError
- def initialize(msg="")
- super(msg)
- end
-
- end
-
- # Exception use in {Sc4ry::Circuits} on config management issues
- class ConfigError < StandardError
- def initialize(msg="")
- super(msg)
- end
-
- end
-
+ # Exception use in {Sc4ry::Circuits} on config management issues
+ class ConfigError < StandardError
+ def initialize(msg = '')
+ super(msg)
+ end
end
-end
\ No newline at end of file
+ end
+end