From 19628a60a133ecb1421ae2b0ac09ec9791239c8f Mon Sep 17 00:00:00 2001 From: kitfox Date: Sat, 9 Mar 2013 15:51:42 +0000 Subject: Error handling now sends warnings to Logger. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@149 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- src/main/java/com/kitfox/svg/animation/AnimationElement.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/kitfox/svg/animation/AnimationElement.java') diff --git a/src/main/java/com/kitfox/svg/animation/AnimationElement.java b/src/main/java/com/kitfox/svg/animation/AnimationElement.java index ce49ffa..980a826 100644 --- a/src/main/java/com/kitfox/svg/animation/AnimationElement.java +++ b/src/main/java/com/kitfox/svg/animation/AnimationElement.java @@ -36,6 +36,7 @@ package com.kitfox.svg.animation; +import com.kitfox.svg.SVGConst; import com.kitfox.svg.SVGElement; import com.kitfox.svg.SVGException; import com.kitfox.svg.SVGLoaderHelper; @@ -43,6 +44,8 @@ import com.kitfox.svg.animation.parser.AnimTimeParser; import com.kitfox.svg.animation.parser.ParseException; import com.kitfox.svg.xml.StyleAttribute; import java.io.StringReader; +import java.util.logging.Level; +import java.util.logging.Logger; import org.xml.sax.Attributes; import org.xml.sax.SAXException; @@ -369,7 +372,8 @@ public abstract class AnimationElement extends SVGElement try { this.beginTime = animTimeParser.Expr(); } catch (ParseException ex) { - ex.printStackTrace(); + Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, + "Could not parse '" + newVal + "'", ex); } } @@ -380,7 +384,8 @@ public abstract class AnimationElement extends SVGElement try { this.durTime = animTimeParser.Expr(); } catch (ParseException ex) { - ex.printStackTrace(); + Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, + "Could not parse '" + newVal + "'", ex); } } @@ -391,7 +396,8 @@ public abstract class AnimationElement extends SVGElement try { this.endTime = animTimeParser.Expr(); } catch (ParseException ex) { - ex.printStackTrace(); + Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, + "Could not parse '" + newVal + "'", ex); } } -- cgit v1.2.3-55-g7522