TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohith
NA
2
0
Exception - Stack Trace
Aug 9 2006 12:08 AM
Hi All, I am using .net 2005 edition. Herez my code snippet: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnAdd_Click(object sender, EventArgs e) { try { FillText(); } catch (System.Exception exx) { MessageBox.Show(exx.StackTrace, "Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop); } } private void FillText() { try { txtName.Text = "ABC"; string a = null; string b = a.ToString(); } catch (System.Exception ex) { throw; //throw ex; //throw new System.Exception(); } } } ----- when the excp.StackTrace gets printed, the line number of the exception is pointed to the "throw" statement in the catch block of FillText() method. Whereas it should be pointing to the "string b = a.ToString();" statement in the try block of the same method. Isnt it incorrect?
Reply
Answers (
0
)
XML writing Problem
working with dropdownlists