1 18 package org.apache.batik.svggen; 19 20 26 public class SVGGraphics2DRuntimeException extends RuntimeException { 27 28 private Exception embedded; 29 30 35 public SVGGraphics2DRuntimeException(String s) { 36 this(s, null); 37 } 38 39 44 public SVGGraphics2DRuntimeException(Exception ex) { 45 this(null, ex); 46 } 47 48 54 public SVGGraphics2DRuntimeException(String s, Exception ex) { 55 super(s); 56 embedded = ex; 57 } 58 59 64 public String getMessage() { 65 String msg = super.getMessage(); 66 if (msg != null) { 67 return msg; 68 } else if (embedded != null) { 69 return embedded.getMessage(); 70 } else { 71 return null; 72 } 73 } 74 75 78 public Exception getException() { 79 return embedded; 80 } 81 } 82 | Popular Tags |