fn print_traceback_entry(vm: &VirtualMachine, tb_entry: &PyObjectRef) {
    if objtype::isinstance(&tb_entry, &vm.ctx.tuple_type()) {
        let location_attrs = objsequence::get_elements_tuple(&tb_entry);
        let filename = if let Ok(x) = vm.to_str(&location_attrs[0]) {
            x.value.clone()
        } else {
            "<error>".to_string()
        };

        let lineno = if let Ok(x) = vm.to_str(&location_attrs[1]) {
            x.value.clone()
        } else {
            "<error>".to_string()
        };

        let obj_name = if let Ok(x) = vm.to_str(&location_attrs[2]) {
            x.value.clone()
        } else {
            "<error>".to_string()
        };

        println!(
            r##"  File "{}", line {}, in {}"##,
            filename, lineno, obj_name
        );
        print_source_line(filename, lineno.parse().unwrap());
    } else {
        println!("  File ??");
    }
}
/// Print exception occurrence location from traceback element
Print exception occurrence location from traceback element
Print exception occurrence location from traceback element
fn print_traceback_entry(vm: &VirtualMachine, tb_entry: &PyObjectRef) {
    if objtype::isinstance(&tb_entry, &vm.ctx.tuple_type()) {
        let location_attrs = objsequence::get_elements_tuple(&tb_entry);
        let filename = if let Ok(x) = vm.to_str(&location_attrs[0]) {
            x.value.clone()
        } else {
            "<error>".to_string()
        };
        let lineno = if let Ok(x) = vm.to_str(&location_attrs[1]) {
            x.value.clone()
        } else {
            "<error>".to_string()
        };
        let obj_name = if let Ok(x) = vm.to_str(&location_attrs[2]) {
            x.value.clone()
        } else {
            "<error>".to_string()
        };
        println!(
            r##"  File "{}", line {}, in {}"##,
            filename, lineno, obj_name
        );
        print_source_line(filename, lineno.parse().unwrap());
    } else {
        println!("  File ??");
    }
}
fn print_traceback_entry ( vm : & VirtualMachine , tb_entry : & PyObjectRef ) { if objtype :: isinstance ( & tb_entry , & vm . ctx . tuple_type ( ) ) { let location_attrs = objsequence :: get_elements_tuple ( & tb_entry ) ; let filename = if let Ok ( x ) = vm . to_str ( & location_attrs [ 0 ] ) { x . value . clone ( ) } else { " " . to_string ( ) } ; let lineno = if let Ok ( x ) = vm . to_str ( & location_attrs [ 1 ] ) { x . value . clone ( ) } else { " " . to_string ( ) } ; let obj_name = if let Ok ( x ) = vm . to_str ( & location_attrs [ 2 ] ) { x . value . clone ( ) } else { " " . to_string ( ) } ; println ! ( r##"  File "{}", line {}, in {}"## filename lineno obj_name ) ; print_source_line ( filename , lineno . parse ( ) . unwrap ( ) ) ; } else { println ! ( " " ) ; } }
Print exception occurrence location from traceback element
Print exception occurrence location from traceback element
vm
&VirtualMachine
tb_entry
&PyObjectRef
vm
&VirtualMachine
tb_entry
&PyObjectRef