G
Guest
How can I catch an error and throw the exception message plus some custom text?
For example, I'd like to do something like this:
try
{
//generate error
}
catch
{
//throw ex + " my custom message";
// OR
//throw ex.Message + " my custom message";
}
How is this possible without writing my own custom exception class?
Thanks.
For example, I'd like to do something like this:
try
{
//generate error
}
catch
{
//throw ex + " my custom message";
// OR
//throw ex.Message + " my custom message";
}
How is this possible without writing my own custom exception class?
Thanks.