提交 0243e2d8 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved error message.

上级 aa8bb832
......@@ -432,11 +432,11 @@ public abstract class Value {
* @return the result
*/
public Value add(Value v) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("+");
}
public int getSignum() {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("SIGNUM");
}
/**
......@@ -445,7 +445,7 @@ public abstract class Value {
* @return the negative
*/
public Value negate() {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("NEG");
}
/**
......@@ -455,7 +455,7 @@ public abstract class Value {
* @return the result
*/
public Value subtract(Value v) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("-");
}
/**
......@@ -465,7 +465,7 @@ public abstract class Value {
* @return the result
*/
public Value divide(Value v) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("/");
}
/**
......@@ -475,7 +475,7 @@ public abstract class Value {
* @return the result
*/
public Value multiply(Value v) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("*");
}
/**
......@@ -973,11 +973,11 @@ public abstract class Value {
/**
* Throw the exception that the feature is not support for the given data type.
*
* @return the exception
* @return never returns normally
* @throws the exception
*/
protected DbException throwUnsupportedExceptionForType() {
throw DbException.getUnsupportedException(DataType.getDataType(getType()).name);
protected DbException throwUnsupportedExceptionForType(String op) {
throw DbException.getUnsupportedException(DataType.getDataType(getType()).name + " " + op);
}
/**
......
......@@ -93,7 +93,7 @@ public class ValueArray extends Value {
}
public void set(PreparedStatement prep, int parameterIndex) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("PreparedStatement.set");
}
public String getSQL() {
......
......@@ -114,7 +114,7 @@ public class ValueResultSet extends Value {
}
protected int compareSecure(Value v, CompareMode mode) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("<=>");
}
public boolean equals(Object other) {
......@@ -134,7 +134,7 @@ public class ValueResultSet extends Value {
}
public void set(PreparedStatement prep, int parameterIndex) {
throw throwUnsupportedExceptionForType();
throw throwUnsupportedExceptionForType("PreparedStatement.set");
}
public String getSQL() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论