lib/hanami/cli/errors.rb in hanami-cli-2.1.1 vs lib/hanami/cli/errors.rb in hanami-cli-2.2.0.beta1
- old
+ new
@@ -89,7 +89,35 @@
class UnsupportedDatabaseSchemeError < Error
def initialize(scheme)
super("`#{scheme}' is not a supported db scheme")
end
end
+
+ # @since 2.2.0
+ # @api public
+ class DatabaseNotSupportedError < Error
+ def initialize(invalid_database, supported_databases)
+ super("`#{invalid_database}' is not a supported database. Supported databases are: #{supported_databases.join(', ')}")
+ end
+ end
+
+ # @since 2.2.0
+ # @api public
+ class ConflictingOptionsError < Error
+ def initialize(option1, option2)
+ super("`#{option1}' and `#{option2}' cannot be used together")
+ end
+ end
+
+ # @since 2.2.0
+ # @api public
+ class InvalidMigrationNameError < Error
+ def initialize(name)
+ super(<<~TEXT)
+ Invalid migration name: #{name}
+
+ Name must contain only letters, numbers, and underscores.
+ TEXT
+ end
+ end
end
end