output(...) now returns an Err(...) if it fails to parse a line.
This commit is contained in:
parent
21136c4ec2
commit
fb8081cf77
1 changed files with 5 additions and 2 deletions
|
@ -68,7 +68,10 @@ impl<'a, T, U> Bot<'a> for IrcBot<'a, T, U> where T: IrcWriter, U: IrcReader {
|
|||
try!(self.handle_command(source, command, args.as_slice()));
|
||||
println!("{}", ln)
|
||||
},
|
||||
Err(e) => println!("Shit, you're fucked! {}", e),
|
||||
Err(e) => {
|
||||
println!("Shit, you're fucked! {}", e);
|
||||
return Err(e)
|
||||
},
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
@ -158,7 +161,7 @@ impl<'a, T, U> IrcBot<'a, T, U> where T: IrcWriter, U: IrcReader {
|
|||
mod test {
|
||||
use Bot;
|
||||
use super::IrcBot;
|
||||
use std::io::MemWriter;
|
||||
use std::io::{BufReader, MemWriter};
|
||||
use std::io::util::NullReader;
|
||||
use conn::Connection;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue