1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//! Error types and utilities. error_chain! { errors { /// A variant indicating that a runtime error has occured. ScriptException(message: String) { description("JavaScript exception") display("JavaScript exception: {}", message) } /// An error caused by incorrect code syntax. ScriptCompile(message: String) { description("JavaScript compile error") display("JavaScript compile error: {}", message) } } }