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

@ -54,8 +54,8 @@ impl Actor for RootActor {
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() {
"listAddons" => {
let actor = ErrorReply {
from: "root".to_string(),
@ -80,7 +80,7 @@ impl Actor for RootActor {
}
_ => false
}
})
}
}