T
Tony Johansson
Hello!
First of all All Exceptions must be derived from class Exception.
I just wonder what is the point to have this catch statement alone as you
can see below.
These two try.. catch below are doing the same thing.
The first one catch an Exception and all classes derived from it because
every exception must be derived from class Exception
The second catch everything. Here everything is all Exeption and all classes
below.
So as summary catch and catch(Exception) is doing the same thing
You can't for example do something like thow 2 or throw "hej";
try
{
//here we thow some kind of exception
}
catch(Exception)
{
}
try
{
//here we thow some kind of exception
}
catch
{
}
//Tony
First of all All Exceptions must be derived from class Exception.
I just wonder what is the point to have this catch statement alone as you
can see below.
These two try.. catch below are doing the same thing.
The first one catch an Exception and all classes derived from it because
every exception must be derived from class Exception
The second catch everything. Here everything is all Exeption and all classes
below.
So as summary catch and catch(Exception) is doing the same thing
You can't for example do something like thow 2 or throw "hej";
try
{
//here we thow some kind of exception
}
catch(Exception)
{
}
try
{
//here we thow some kind of exception
}
catch
{
}
//Tony