svgcleaner/error.rs
1// svgcleaner could help you to clean up your SVG files
2// from unnecessary data.
3// Copyright (C) 2012-2018 Evgeniy Reizner
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License along
16// with this program; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19use svgdom;
20
21error_chain! {
22 types {
23 Error, ErrorKind, ResultExt, Result;
24 }
25
26 links {
27 Dom(svgdom::Error, svgdom::ErrorKind) #[doc = "svgdom errors"];
28 }
29
30 errors {
31 UnresolvedAttribute(attr_name: String) {
32 display("failed to resolved attribute '{}'", attr_name)
33 }
34
35 MissingAttribute(tag_name: String, attr_name: String) {
36 display("the attribute '{}' is missing in the '{}' element", attr_name, tag_name)
37 }
38
39 ScriptingIsNotSupported {
40 display("scripting is not supported")
41 }
42
43 AnimationIsNotSupported {
44 display("animation is not supported")
45 }
46
47 ConditionalProcessingIsNotSupported {
48 display("conditional processing attributes is not supported")
49 }
50
51 ExternalHrefIsNotSupported(ref_data: String) {
52 display("the 'xlink:href' attribute is referencing an external object '{}', \
53 which is not supported", ref_data)
54 }
55 }
56}