M
michael
Hello everybody,
I've created for one of my classes a exception class derivated from
System.Exception. This exception class is public and lies within my
class as inner class.
When I throw this exception I can't catch it with its name! When I try
to catch it with it's name then the catch-block will be ignored.... So
I've made a general catch with System.Exception and printed the
runtime type...
....
catch (Exception ex)
{
Console.WriteLine(ex.getType());
}
....
To my surprise the I've got the following typename:
namespace.outer_classname+ownexception_classname
What is this plus in the typename? I've never seen this bevore... Am I
doing something wrong? Or is there a trick to catch exceptions of this
type?
Help would be appreciated
Michael Wisheu
I've created for one of my classes a exception class derivated from
System.Exception. This exception class is public and lies within my
class as inner class.
When I throw this exception I can't catch it with its name! When I try
to catch it with it's name then the catch-block will be ignored.... So
I've made a general catch with System.Exception and printed the
runtime type...
....
catch (Exception ex)
{
Console.WriteLine(ex.getType());
}
....
To my surprise the I've got the following typename:
namespace.outer_classname+ownexception_classname
What is this plus in the typename? I've never seen this bevore... Am I
doing something wrong? Or is there a trick to catch exceptions of this
type?
Help would be appreciated
Michael Wisheu