utilitaire
Regular
- Joined
- May 4, 2005
- Messages
- 77
When I use objects like System.Web.UI.Page, I can generate exceptions that will occur inside some properties or methods. For instance, If I try to access the "Session" property in the Page Constructor, it will generate an error. However, the code that threw the exception will always be hidden from me. I mean I will never see the "throw new Exception" line inside the "Session" property of the Page object in my browser. The browser will show me my own line, in witch I called the "Session" property.
Example:
public class MyPage: Page
{
public MyPage()
{
Session["test"] = "test";
}
}
This code will generate an exception. However, even if the exception is thrown inside the Session property, my browser will only show me my own code. I wonder how to do that with my own code. This could be very usefull.
Example:
public class MyPage: Page
{
public MyPage()
{
Session["test"] = "test";
}
}
This code will generate an exception. However, even if the exception is thrown inside the Session property, my browser will only show me my own code. I wonder how to do that with my own code. This could be very usefull.