1 package net.sf.saxon.trans; 2 import javax.xml.transform.SourceLocator ; 3 import javax.xml.transform.TransformerException ; 4 5 8 9 public class StaticError extends XPathException { 10 11 public StaticError(String message) { 12 super(message); 13 } 14 15 public StaticError(Exception err) { 16 super(err); 17 } 18 19 public StaticError(String message, Throwable err) { 20 super(message, err); 21 } 22 23 public StaticError(String message, SourceLocator loc) { 24 super(message, loc); 25 } 26 27 30 31 public StaticError makeStatic() { 32 return this; 33 } 34 35 public static StaticError makeStaticError(TransformerException err) { 36 if (err instanceof XPathException) { 37 return ((XPathException)err).makeStatic(); 38 } else if (err.getException() instanceof XPathException) { 39 return ((XPathException)err.getException()).makeStatic(); 40 } else { 41 return new StaticError(err); 42 } 43 } 44 45 } 46 47 65 | Popular Tags |