devtools: handle script task panics gracefully in ConsoleActor.

This commit is contained in:
Eduard Burtescu 2014-12-05 02:57:32 +02:00
parent 92a8c7a80c
commit b328c57caa
6 changed files with 44 additions and 31 deletions

View file

@ -78,8 +78,8 @@ impl Actor for TabActor {
registry: &ActorRegistry,
msg_type: &String,
_msg: &json::JsonObject,
stream: &mut TcpStream) -> bool {
match msg_type.as_slice() {
stream: &mut TcpStream) -> Result<bool, ()> {
Ok(match msg_type.as_slice() {
"reconfigure" => {
stream.write_json_packet(&ReconfigureReply { from: self.name() });
true
@ -125,7 +125,7 @@ impl Actor for TabActor {
}
_ => false
}
})
}
}