本文整理汇总了Java中org.apache.commons.math3.exception.util.ExceptionContext.addMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ExceptionContext.addMessage方法的具体用法?Java ExceptionContext.addMessage怎么用?Java ExceptionContext.addMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.exception.util.ExceptionContext
的用法示例。
在下文中一共展示了ExceptionContext.addMessage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MathIllegalStateException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* Simple constructor.
*
* @param cause Root cause.
* @param pattern Message pattern explaining the cause of the error.
* @param args Arguments.
*/
public MathIllegalStateException(Throwable cause,
Localizable pattern,
Object ... args) {
super(cause);
context = new ExceptionContext(this);
context.addMessage(pattern, args);
}
示例2: NonPositiveDefiniteMatrixException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* Construct an exception.
*
* @param wrong Value that fails the positivity check.
* @param index Row (and column) index.
* @param threshold Absolute positivity threshold.
*/
public NonPositiveDefiniteMatrixException(double wrong,
int index,
double threshold) {
super(wrong, threshold, false);
this.index = index;
this.threshold = threshold;
final ExceptionContext context = getContext();
context.addMessage(LocalizedFormats.NOT_POSITIVE_DEFINITE_MATRIX);
context.addMessage(LocalizedFormats.ARRAY_ELEMENT, wrong, index);
}
示例3: MathIllegalArgumentException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* @param pattern Message pattern explaining the cause of the error.
* @param args Arguments.
*/
public MathIllegalArgumentException(Localizable pattern,
Object ... args) {
context = new ExceptionContext(this);
context.addMessage(pattern, args);
}
示例4: MathArithmeticException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* Default constructor.
*/
public MathArithmeticException() {
context = new ExceptionContext(this);
context.addMessage(LocalizedFormats.ARITHMETIC_EXCEPTION);
}
示例5: MathUnsupportedOperationException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* @param pattern Message pattern providing the specific context of
* the error.
* @param args Arguments.
*/
public MathUnsupportedOperationException(Localizable pattern,
Object ... args) {
context = new ExceptionContext(this);
context.addMessage(pattern, args);
}
示例6: MathRuntimeException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* @param pattern Message pattern explaining the cause of the error.
* @param args Arguments.
*/
public MathRuntimeException(Localizable pattern,
Object ... args) {
context = new ExceptionContext(this);
context.addMessage(pattern, args);
}
示例7: MathArithmeticException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* Constructor with a specific message.
*
* @param pattern Message pattern providing the specific context of
* the error.
* @param args Arguments.
*/
public MathArithmeticException(Localizable pattern,
Object ... args) {
context = new ExceptionContext(this);
context.addMessage(pattern, args);
}
示例8: MathIllegalStateException
import org.apache.commons.math3.exception.util.ExceptionContext; //导入方法依赖的package包/类
/**
* Simple constructor.
*
* @param pattern Message pattern explaining the cause of the error.
* @param args Arguments.
*/
public MathIllegalStateException(Localizable pattern,
Object ... args) {
context = new ExceptionContext(this);
context.addMessage(pattern, args);
}