Sha256: cda5da856bc7619f43003eff3245a87c94c2edd2b9790084cc242d7f537059e7

Contents?: true

Size: 874 Bytes

Versions: 8

Compression:

Stored size: 874 Bytes

Contents

module Pione
  module Global
    class GlobalError < StandardError; end

    # UnknownItem is raised when unknown global item is referred.
    class UnknownItem < GlobalError
      def initialize(name)
        @name = name
      end

      def message
        "item '%s' is unknown as global variables" % @name
      end
    end

    # This exception class is raised when configuration file is in invalid format.
    class InvalidConfigFile < GlobalError
      # config file path
      attr_reader :path

      def initialize(path)
        @path = path
      end

      def message
        "invalid format configuration file: %s" % @path
      end
    end

    class UnconfigurableVariableError < GlobalError
      def initialize(name)
        @name = name
      end

      def message
        "global variable \"%s\" is unconfigurable." % @name
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pione-0.5.0 lib/pione/global/global-exception.rb
pione-0.5.0.alpha.2 lib/pione/global/global-exception.rb
pione-0.5.0.alpha.1 lib/pione/global/global-exception.rb
pione-0.4.2 lib/pione/global/global-exception.rb
pione-0.4.1 lib/pione/global/global-exception.rb
pione-0.4.0 lib/pione/global/global-exception.rb
pione-0.3.2 lib/pione/global/global-exception.rb
pione-0.3.1 lib/pione/global/global-exception.rb