Revert "Add: impl ImagError for ModuleError"

This reverts commit 7b1f9cfbac.
This commit is contained in:
Matthias Beyer 2015-10-19 17:31:07 +02:00
parent 4608b68628
commit f1a67dba10

View file

@ -1,5 +1,4 @@
use runtime::Runtime;
use error::ImagError;
use error::ImagErrorBase;
pub struct ModuleError {
@ -25,36 +24,6 @@ impl ModuleError {
}
impl<'a> ImagError<'a> for ModuleError {
fn print(&self, rt: &Runtime) {
if self.base.longdesc.is_empty() {
let s = format!("{}: {}\n\n{}\n\n",
self.module_name,
self.base.shortdesc,
self.base.longdesc);
rt.print(&s)
} else {
let s = format!("{}: {}\n",
self.module_name,
self.base.shortdesc);
rt.print(&s)
}
}
fn print_short(&self, rt : &Runtime) {
let s = format!("{}: {}\n", self.module_name, self.base.shortdesc);
rt.print(&s)
}
fn print_long(&self, rt : &Runtime) {
let s = format!("{}: {}\n\n{}\n\n",
self.module_name,
self.base.shortdesc,
self.base.longdesc);
rt.print(&s)
}
}
pub trait Module {
fn new() -> Self;