Sha256: 63c5112653c5ee2519ba61d7a4c061f2fe48a39d7e3443f9c15ccb3a9a41a4fe

Contents?: true

Size: 905 Bytes

Versions: 3

Compression:

Stored size: 905 Bytes

Contents

# This module is where you can override the default behavior of exception classes or add other exception classes.
# The default behavior of the exception classes is to create an exception with the message of the constant.
# Exception classes that override generated exception classes must be defined as children of their parent module's generated class.
# Example:
# module ApplicationException
#   include Errationalify
#
#   class ServiceFault < Loggable
#     def initialize(service_name)
#       message = sprintf(ApplicationError::SERVICE_FAULT, service_name)
#     end
#   end
# end
# module ApplicationError
#   module General
#     UNEXPECTED = "An error has occurred in the application. Please try again."
#   end
#   module Loggable
#     SERVICE_FAULT = "The response from %s cannot be processed. Please try again"
#   end
# end

module <%= @exception_module_name %>
  include Errationalify
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
errational-0.12.04 lib/generators/templates/exception_module.rb
errational-0.9.09 lib/generators/templates/exception_module.rb
errational-0.8.16 lib/generators/templates/exception_module.rb