Sha256: dbdd50078d1bff4d9ba54444474b135a16ebcc1b0967880a991437e11eba2960

Contents?: true

Size: 899 Bytes

Versions: 13

Compression:

Stored size: 899 Bytes

Contents

# encoding: utf-8

module Adhearsion
  module CLI
    class UnknownCommand < Thor::Error
      def initialize(cmd)
        super "Unknown command: #{cmd}"
      end
    end

    class PathRequired < Thor::Error
      def initialize(cmd)
        super "A valid path is required for #{cmd}, unless run from an Adhearson app directory"
      end
    end

     class UnknownGeneratorError < Thor::Error
      def initialize(gentype)
        puts "Please specify generator to use (#{Adhearsion::Generators.mappings.keys.join(", ")})"
        super "Unknown command: #{gentype}"
      end
    end

    class PathInvalid < Thor::Error
      def initialize(path)
        super "Directory #{path} does not belong to an Adhearsion project!"
      end
    end

    class PIDReadError < Thor::Error
      def initialize(path)
        super "Could not read pid from the file #{path}"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adhearsion-2.6.4 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.6.3 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.6.2 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.6.1 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.6.0 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.5.4 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.5.3 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.5.2 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.5.0 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.4.0 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.4.0.beta3 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.4.0.beta2 lib/adhearsion/cli_commands/thor_errors.rb
adhearsion-2.4.0.beta1 lib/adhearsion/cli_commands/thor_errors.rb