List of usage examples for java.lang OutOfMemoryError OutOfMemoryError
public OutOfMemoryError(String s)
From source file:uk.ac.diamond.scisoft.analysis.dataset.ShortDataset.java
private static short[] createArray(final int size) { // PRIM_TYPE short[] array = null; // PRIM_TYPE try {//w ww . jav a 2 s . c om array = new short[size]; // PRIM_TYPE } catch (OutOfMemoryError e) { logger.error("The size of the dataset ({}) that is being created is too large " + "and there is not enough memory to hold it.", size); throw new OutOfMemoryError("The dimensions given are too large, and there is " + "not enough memory available in the Java Virtual Machine"); } return array; }