I'm developing a web project where i need to add custom exception classes. For example, how can i display a message from my custom exception class when the session timeout occurs? Please help. Any sample will be helpful.
This is what i written in my exception class so far:
public class CustomException : Exception
{
private string message;
public CustomException ()
{
this.message = "Invalid Query";
}
public CustomException (String message)
{
this.message = message;
}
}
Need to know how to link this with the session timeout, from where i need to write the logic of the same. Thank You.