Merge pull request #988 from ethcore/rpc-exception-handling

Exception handling in RPC & WebApps
This commit is contained in:
Marek Kotewicz
2016-04-28 10:02:12 +02:00
9 changed files with 48 additions and 18 deletions

View File

@@ -85,7 +85,9 @@ impl PanicHandler {
Ok(result)
}
fn notify_all(&self, r: String) {
/// Notifies all listeners in case there is a panic.
/// You should use `catch_panic` instead of calling this method explicitly.
pub fn notify_all(&self, r: String) {
let mut listeners = self.listeners.lock().unwrap();
for listener in listeners.deref_mut() {
listener.call(&r);