473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Getting backtrace on an axception

So I have this code

try:
do something
except:
do something else

In the except block I need to print detailed output about the error
occured, and in particular I need to read the backtrace for the line
that raised the exception [then modify and print it]. I know about the
exception.extract_tb() and friends, but I can't figure out how they
works.

Can somebody exlpain me?

Thnx
PAolo
--
if you have a minute to spend please visit my photogrphy site:
http://mypic.co.nr
Jun 10 '06 #1
0 1086

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Geoff Soper | last post by:
How can I get the name of a variable? i.e. $this_is_a_variable = 10; $variable_name = ????($this_is_a_variable); echo $variable_name; // Displays 'this_is_a_variable' Thanks, Geoff
2
by: Rafal 'Raf256' Maj | last post by:
Hi, how can I manualy dump a backtrace and/or coredump to a file and/or console? Can I do it without aborting the program? --...
6
by: milkyway | last post by:
Hello out there, When one gets an error, they can use fprintf (Stdout, "File %s Line %d\n", __FILE__, __LINE__); Is there a similar way where on can print out the stack trace? Any help,...
2
by: NeoTrantor | last post by:
Hi, is there any way to print/log a backtrace or crash report on segfault without the need of user interaction? I know I could run my program via gdb and use "bt" to see what happened on crash...
0
by: coolvinayak | last post by:
The backtrace() provides complete stacktrace. Using backtrace_symbols(), stacktrace can be printed as: ./build/gtest(func1_name+0x129) ./build/gtest(func2_name+0x193) ...
5
by: James Stroud | last post by:
Hello All, The built-in mac osx vecLib is segfaulting in some cases--A very fun fact to find out the hard way over two nights of work. I also spent an embarrassing amount of time figuring out...
3
by: cgable2003 | last post by:
I copied this code fragment from http://www.gnu.org/software/libc/manual/html_node/Backtraces.html #include <execinfo.h> #include <stdio.h> #include <stdlib.h> /* Obtain a backtrace and print...
18
by: sophia | last post by:
Dear all, can any one suggest ways of implementing a backtrace function in ANSI/ standard C as given in the following link ? ...
0
by: Chris Rebert | last post by:
On Fri, Oct 17, 2008 at 9:40 AM, Heston James - Cold Beans <heston.james@coldbeans.co.ukwrote: Use format_exc() in the 'traceback' module to get a string for the current stack trace (and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.