提交 eb6934d0 authored 作者: noelgrandin's avatar noelgrandin

we have a utility method, so lets use it

上级 c9818113
......@@ -5365,7 +5365,7 @@ public class Parser {
if ("InnoDb".equalsIgnoreCase(tableEngine)) {
// ok
} else if (!"MyISAM".equalsIgnoreCase(tableEngine)) {
throw DbException.get(ErrorCode.FEATURE_NOT_SUPPORTED_1, tableEngine);
throw DbException.getUnsupportedException(tableEngine);
}
} else {
command.setTableEngine(readUniqueIdentifier());
......
......@@ -182,7 +182,7 @@ public class AlterTableAddConstraint extends SchemaCommand {
Table refTable = refSchema.getTableOrView(session, refTableName);
session.getUser().checkRight(refTable, Right.ALL);
if (!refTable.canReference()) {
throw DbException.get(ErrorCode.FEATURE_NOT_SUPPORTED_1, "Reference " + refTable.getSQL());
throw DbException.getUnsupportedException("Reference " + refTable.getSQL());
}
boolean isOwner = false;
IndexColumn.mapColumns(indexColumns, table);
......
......@@ -93,7 +93,7 @@ public class CreateView extends SchemaCommand {
} else {
ArrayList<Parameter> params = select.getParameters();
if (params != null && params.size() > 0) {
throw DbException.get(ErrorCode.FEATURE_NOT_SUPPORTED_1, "parameters in views");
throw DbException.getUnsupportedException("parameters in views");
}
querySQL = select.getPlanSQL();
}
......
......@@ -76,7 +76,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
for (IndexColumn c : columns) {
int type = c.column.getType();
if (type == Value.CLOB || type == Value.BLOB) {
throw DbException.get(ErrorCode.FEATURE_NOT_SUPPORTED_1, "Index on BLOB or CLOB column: " + c.column.getCreateSQL());
throw DbException.getUnsupportedException("Index on BLOB or CLOB column: " + c.column.getCreateSQL());
}
}
}
......
......@@ -899,7 +899,7 @@ public class Csv implements SimpleRowSource {
} else if (isParam(key, "caseSensitiveColumnNames")) {
setCaseSensitiveColumnNames(Boolean.parseBoolean(value));
} else {
throw DbException.get(ErrorCode.FEATURE_NOT_SUPPORTED_1, key);
throw DbException.getUnsupportedException(key);
}
}
return charset;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论