Answer the question
In order to leave comments, you need to log in
Is there a c++ universal exception format like in java?
Is there a generic exception in c++ that allows you to abstract from the type of exception being thrown, like in java?
Example:
try
{
throw // любое исключение
}catch(Exception er)
{
....
}
Answer the question
In order to leave comments, you need to log in
You can intercept almost everything, but there will be no additional data. Or catch several types of exceptions in turn. Plus there are structural exceptions that catch will not catch.
try
{
}
catch( std::exception & e )
{
// только тип std::exception
}
catch(...)
{
// все прочие типы
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question