-
January 3rd, 2011, 12:22 AM
#1
How to catch exeption if I don't know what it is?
How can I write code that will catch an exeption, if I don't know what to expect?
Ex, in C# I can do this:
Code:
try
{
//lot of code
}
catch (Exception ex)
{
Console.Write("error: {0}",ex.ToString();
}
Is there a way to do this in C++? Often, it's not known what type of exception can be thrown, so it's hard to try to catch specific ones, and often times some can be missed, especially when using 3rd party libraries.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|