Example usage for org.apache.commons.math MathException printStackTrace

List of usage examples for org.apache.commons.math MathException printStackTrace

Introduction

In this page you can find the example usage for org.apache.commons.math MathException printStackTrace.

Prototype

@Override
public void printStackTrace(PrintStream out) 

Source Link

Document

Prints the stack trace of this exception to the specified stream.

Usage

From source file:edu.utexas.cs.tactex.servercustomers.factoredcustomer.ProbabilityDistribution.java

double drawSample() {
    try {/*from  w ww.  j  av a 2s . co  m*/
        return sampler.sample();
    } catch (MathException e) {
        System.err.println("ProbabilityDistribution(" + toString() + ") - drawSample():" + toString()
                + " Caught MathException:\n");
        e.printStackTrace(System.err);
        throw new Error("ProbabilityDistribution(" + toString() + ") - drawSample(): Caught MathException: "
                + e.toString());
    }
}