Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5240#discussion_r162964475
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/exceptions.scala
---
@@ -136,12 +136,51 @@ case class CatalogAlreadyExistException(
def this(catalog: String) = this(catalog, null)
}
+/**
+ * Exception for not finding a
[[org.apache.flink.table.sources.TableSourceFactory]] for the
+ * given properties.
+ *
+ * @param properties properties that describe the table source
+ * @param cause the cause
+ */
+case class NoMatchingTableSourceException(
+ properties: Map[String, String],
+ cause: Throwable)
+ extends RuntimeException(
+ s"Could not find a table source factory in the classpath satisfying
the " +
+ s"following properties: \n${properties.map(e => e._1 + "=" + e._2
).mkString("\n")}",
+ cause) {
+
+ def this(properties: Map[String, String]) = this(properties, null)
+}
+
+/**
+ * Exception for finding more than one
[[org.apache.flink.table.sources.TableSourceFactory]] for
+ * the given properties.
+ *
+ * @param properties properties that describe the table source
+ * @param cause the cause
+ */
+case class AmbiguousTableSourceException(
+ properties: Map[String, String],
+ cause: Throwable)
+ extends RuntimeException(
+ s"More than one table source factory in the classpath satisfying the
" +
+ s"following properties: \n${properties.map(e => e._1 + "=" + e._2
).mkString("\n")}",
+ cause) {
+
+ def this(properties: Map[String, String]) = this(properties, null)
+}
+
/**
* Exception for not finding a [[TableSourceConverter]] for a given table
type.
*
* @param tableType table type
* @param cause the cause
+ * @deprecated Use table source factories instead.
*/
+@Deprecated
+@deprecated("Use table factories instead.")
--- End diff --
Give a class name.
---