sass_alt/SassCompileError.rs
1// This file is part of sass-alt. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/sass-alt/master/COPYRIGHT. No part of predicator, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2017 The developers of sass-alt. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/sass-alt/master/COPYRIGHT.
3
4
5quick_error!
6{
7 /// A compilation error.
8 #[derive(Debug)]
9 pub enum SassCompileError
10 {
11 /// An unknown reason for compilation failure because the underlying libsass library did not provide a reason.
12 Unknown
13 {
14 description("Could not find compile for unknown reasons")
15 display("Could not find compile for unknown reasons")
16 }
17
18 /// A known reason for compilation failure.
19 Known(reason: CString)
20 {
21 description("Could not compile")
22 display("Could not compile because {:?}", reason)
23 }
24
25 /// A known reason for compilation failure.
26 CssWasNotUtf8(cause: Utf8Error)
27 {
28 cause(cause)
29 description("CSS string was not UTF-8")
30 display("CSS string was not UTF-8 {:?}", cause)
31 from()
32 }
33 }
34}