Example usage for java.awt.geom NoninvertibleTransformException NoninvertibleTransformException

List of usage examples for java.awt.geom NoninvertibleTransformException NoninvertibleTransformException

Introduction

In this page you can find the example usage for java.awt.geom NoninvertibleTransformException NoninvertibleTransformException.

Prototype

public NoninvertibleTransformException(String s) 

Source Link

Document

Constructs an instance of NoninvertibleTransformException with the specified detail message.

Usage

From source file:org.geoserver.wms.map.RenderedImageMapOutputFormatTest.java

/**
 * Checks {@link RenderedImageMapOutputFormat} makes good use of {@link RenderExceptionStrategy}
 *//*  w  w w.  j a  v a  2 s .  c  o  m*/
@SuppressWarnings("deprecation")
@Test
public void testRenderingErrorsHandling() throws Exception {

    // the ones that are ignorable by the renderer
    assertNotNull(forceRenderingError(new TransformException("fake transform exception")));
    assertNotNull(forceRenderingError(new NoninvertibleTransformException("fake non invertible exception")));
    assertNotNull(forceRenderingError(new IllegalAttributeException("non illegal attribute exception")));
    assertNotNull(forceRenderingError(new FactoryException("fake factory exception")));

    // any other one should make the map producer fail
    try {
        forceRenderingError(new RuntimeException("fake runtime exception"));
        fail("Expected WMSException");
    } catch (ServiceException e) {
        assertTrue(true);
    }

    try {
        forceRenderingError(new IOException("fake IO exception"));
        fail("Expected WMSException");
    } catch (ServiceException e) {
        assertTrue(true);
    }

    try {
        forceRenderingError(new IllegalArgumentException("fake IAE exception"));
        fail("Expected WMSException");
    } catch (ServiceException e) {
        assertTrue(true);
    }
}