1 /*
2
3    Licensed to the Apache Software Foundation (ASF) under one or more
4    contributor license agreements.  See the NOTICE file distributed with
5    this work for additional information regarding copyright ownership.
6    The ASF licenses this file to You under the Apache License, Version 2.0
7    (the "License"); you may not use this file except in compliance with
8    the License.  You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17
18  */

19 package org.apache.batik.css.parser;
20
21 import org.w3c.css.sac.CSSParseException;
22 import org.w3c.css.sac.ErrorHandler;
23
24 /**
25  * This class provides a default implementation of the
26  * {@link ErrorHandler} interface.
27  *
28  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
29  * @version $Id: DefaultErrorHandler.java 1733416 2016-03-03 07:07:13Z gadams $
30  */

31 public class DefaultErrorHandler implements ErrorHandler {
32
33     /**
34      * The instance of this class.
35      */

36     public static final ErrorHandler INSTANCE = new DefaultErrorHandler();
37
38     /**
39      * This class does not need to be instantiated.
40      */

41     protected DefaultErrorHandler() {
42     }
43
44     /**
45      * <b>SAC</b>: Implements {ErrorHandler#warning(CSSParseException)}.
46      */

47     public void warning(CSSParseException e) {
48         // Do nothing
49     }
50
51     /**
52      * <b>SAC</b>: Implements {ErrorHandler#error(CSSParseException)}.
53      */

54     public void error(CSSParseException e) {
55         // Do nothing
56     }
57
58     /**
59      * <b>SAC</b>: Implements {ErrorHandler#fatalError(CSSParseException)}.
60      */

61     public void fatalError(CSSParseException e) {
62         throw e;
63     }
64 }
65