1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use std::str::Utf8Error;
use std::string::FromUtf8Error;
error_chain! {
foreign_links {
FromUtf8(FromUtf8Error) #[doc = "Wraps a UTF-8 error"];
Utf8(Utf8Error) #[doc = "Wraps a UTF-8 error"];
}
errors {
Asset(name: String) {
description("Failed to load asset")
display("Failed to load asset with name {:?}", name)
}
Source {
description("Failed to load bytes from source")
}
Format(format: &'static str) {
description("Format could not load asset")
display("Format {:?} could not load asset", format)
}
UnusedHandle {
description("Asset was loaded but no handle to it was saved.")
}
}
}