/// <summary> /// Construct an exception. /// </summary> /// <param name="wrong">Value that fails the positivity check.</param> /// <param name="index">Row (and column) index.</param> /// <param name="threshold">Absolute positivity threshold.</param> public NonPositiveDefiniteMatrixException(double wrong, int index, double threshold) : base(wrong, threshold, false) { this.index = index; this.threshold = threshold; ExceptionContext context = getContext(); context.addMessage(new LocalizedFormats("NOT_POSITIVE_DEFINITE_MATRIX")); context.addMessage(new LocalizedFormats("ARRAY_ELEMENT"), wrong, index); }
/// <summary> /// </summary> /// <param name="pattern">Message pattern explaining the cause of the error.</param> /// <param name="args">Arguments.</param> public MathIllegalArgumentException(Localizable pattern, params Object[] args) { context = new ExceptionContext(this); context.addMessage(pattern, args); }
/// <summary></summary> /// <param name="pattern">Message pattern providing the specific context of /// the error.</param> /// <param name="args">Arguments.</param> public MathUnsupportedOperationException(Localizable pattern, params Object[] args) { context = new ExceptionContext(this); context.addMessage(pattern, args); }
/// <summary> /// Simple constructor. /// </summary> /// <param name="pattern">Message pattern explaining the cause of the error.</param> /// <param name="args">Arguments.</param> public MathArithmeticException(Localizable pattern, params Object[] args) { context = new ExceptionContext(this); context.addMessage(pattern, args); }
/// <summary> /// Simple constructor. /// </summary> /// <param name="cause">Root cause.</param> /// <param name="pattern">Message pattern explaining the cause of the error.</param> /// <param name="args">Arguments.</param> public MathIllegalStateException(Exception cause, Localizable pattern, params Object[] args) : base(cause.Message) { context = new ExceptionContext(this); context.addMessage(pattern, args); }