From 9bc9befee6fd6de2e772cd2b6fe06242e0126f24 Mon Sep 17 00:00:00 2001 From: veera venky Date: Sun, 10 Feb 2019 16:43:21 +0530 Subject: [PATCH] Added exception string when msg can't be converted to string --- vm/src/exceptions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/exceptions.rs b/vm/src/exceptions.rs index 4fe47cbc3..6780c07e0 100644 --- a/vm/src/exceptions.rs +++ b/vm/src/exceptions.rs @@ -73,7 +73,7 @@ fn exception_str(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult { let msg = if let Some(m) = exc.get_attr("msg") { match vm.to_pystr(&m) { Ok(msg) => msg, - _ => "".to_string(), + _ => "".to_string(), } } else { panic!("Error message must be set");