a developer's notes – a semi-technical web development BLOG

My toRemembers

Remember to:

1. Use the stack track in Visual Studio to find out what envoked the calls
2. Never throw a new exception, because you will lose the stack trace
Wrong way:

try
{
    // Some code that throws an exception

}
catch (Exception ex)
{
    // some code that handles the exception

    throw ex;
}

Right way:

try
{
    // Some code that throws an exception
}
catch (Exception ex)
{
    // some code that handles the exception
    throw;
}

3. Add trace=”true” in your .aspx page to display additional debug information about your page. Then you can

trace.write("My Event", "My Message");
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: