Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception handling
Message
 
 
General information
Forum:
C#
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01651425
Message ID:
01651528
Views:
37
>>Hi Viv,
>>
>>My message perhaps was not very clear. I am asking about the line throw ex - is it possible to enhance this line to include inner exception directly?
>
>As above ex DOES include the inner exception (if there is one). If you want to discard the top level exception and simply pass the inner exception then use:
throw ex.InnerException
>
>
>>
>>That error is later shown on the screen and it says exactly 'error such and such see inner exceptions for details'. This message is not very helpful to the user. I can try to see where in the interface code we're showing that exception and may be add some code there but I've been wondering if it somehow possible when I throw exception enhance its message to include the text of the inner exception directly into the message.


No, I want to pass the original exception but the message should include both original exception + Inner exception if it exists in one message. Not the current standard text saying that you have to look at the inner exception.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform