+1  A: 

In your MyClass, add a property that holds the error info when an error event occurs, then you should be able to look at obj.MyErrorCode and find out what you need.

mspmsp
Okey. That could possibly be a workaround.But it feels like it should be a more direct way.
leiflundgren