1 6 7 package com.hp.hpl.jena.rdf.model.impl; 8 9 import com.hp.hpl.jena.rdf.arp.ParseException; 10 import com.hp.hpl.jena.rdf.model.*; 11 import com.hp.hpl.jena.shared.*; 12 13 import org.apache.commons.logging.Log; 14 import org.apache.commons.logging.LogFactory; 15 21 public class RDFDefaultErrorHandler extends Object implements RDFErrorHandler { 22 23 27 public static boolean silent = false; 28 29 public static final Log logger = LogFactory.getLog( RDFDefaultErrorHandler.class ); 30 31 32 public RDFDefaultErrorHandler() { 33 } 34 35 public void warning(Exception e) { 36 if (!silent) logger.warn(ParseException.formatMessage(e)); 37 } 38 39 public void error(Exception e) { 40 if (!silent) logger.error(ParseException.formatMessage(e)); 41 } 42 43 public void fatalError(Exception e) { 44 if (!silent) logger.error(ParseException.formatMessage(e)); 45 throw e instanceof RuntimeException 46 ? (RuntimeException ) e 47 : new JenaException( e ); 48 } 49 } 50 | Popular Tags |