[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Structured Exception handling in .Net

Ashutosh

10/10/2008 4:10:00 AM

Does .Net have any capability/support for Structured Exception handling?

Thanks & Regards,
Ashutosh
5 Answers

Patrice

10/10/2008 9:00:00 AM

0

Which language are you using ?. Have you checked the documentation (see the
"try" statement) ?

Else please be a bit more explicit on what you are looking for...

--
Patrice


"Ashutosh" <smbs-msdn@nospam.nospam> a écrit dans le message de groupe de
discussion : emJCb2oKJHA.1012@TK2MSFTNGP04.phx.gbl...
> Does .Net have any capability/support for Structured Exception handling?
>
> Thanks & Regards,
> Ashutosh


jialge

10/10/2008 9:35:00 AM

0

Hello Ashutosh

Yes, .NET has the capability and support for SEH. In fact, the CLR
implements its exception handling on top on Window's native
Structured-Exception-Handling (SEH) model.

Take VB.NET as an example,

Structured Exception Handling Overview for Visual Basic
http://msdn.microsoft.com/en-us/library/8a9...
<quote>
Visual Basic supports structured exception handling, which you can use to
create and maintain programs with robust, comprehensive error handlers.
Structured exception handling is code designed to detect and respond to
errors during execution by combining a control structure (similar to Select
Case or While) with exceptions, protected blocks of code, and filters.
Using the Try...Catch...Finally statement, you can protect blocks of code
that have the potential to raise errors. You can nest exception handlers,
and the variables declared in each block will have local scope.
</quote>

Does this answer your question? For more readings:

http://www.microsoft.com/msj/0197/exception/exce...
http://blogs.msdn.com/joelpob/archive/2004/03/05/...
http://blogs.msdn.com/jmstall/archive/2004/10/04/2...
http://www.dotnetjunkies.ddj.com/Tutorial/030F9042-C48A-4210-9977-...
75.dcik

If you have any other questions or concerns, please feel free to tell me.

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#not....

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&am....
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Ashutosh

10/12/2008 6:26:00 AM

0

Hi,
Thanks for the reply. I think I didn't make my question very clear.

I know how the C++/C# try-catch-finally are implemented internally. The
catch block is implemented as the exception filter of the SEH.

My question here is, is there any support to directly use the SEH and
not the C++/C# try-catch-finally in C#? The documentation of .Net
doesn't have any keyword as __excpet

Thanks & Regards,
Ashutosh

Jialiang Ge [MSFT] wrote:
> Hello Ashutosh
>
> Yes, .NET has the capability and support for SEH. In fact, the CLR
> implements its exception handling on top on Window's native
> Structured-Exception-Handling (SEH) model.
>
> Take VB.NET as an example,
>
> Structured Exception Handling Overview for Visual Basic
> http://msdn.microsoft.com/en-us/library/8a9...
> <quote>
> Visual Basic supports structured exception handling, which you can use to
> create and maintain programs with robust, comprehensive error handlers.
> Structured exception handling is code designed to detect and respond to
> errors during execution by combining a control structure (similar to Select
> Case or While) with exceptions, protected blocks of code, and filters.
> Using the Try...Catch...Finally statement, you can protect blocks of code
> that have the potential to raise errors. You can nest exception handlers,
> and the variables declared in each block will have local scope.
> </quote>
>
> Does this answer your question? For more readings:
>
> http://www.microsoft.com/msj/0197/exception/exce...
> http://blogs.msdn.com/joelpob/archive/2004/03/05/...
> http://blogs.msdn.com/jmstall/archive/2004/10/04/2...
> http://www.dotnetjunkies.ddj.com/Tutorial/030F9042-C48A-4210-9977-...
> 75.dcik
>
> If you have any other questions or concerns, please feel free to tell me.
>
> Regards,
> Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#not....
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://support.microsoft.com/select/default.aspx?target=assistance&am....
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>

--
Regards,
Ashutosh Bhawasinka
email: discussion@ashutosh.in
MCSA - Messaging,
MCTS - .Net Windows Apps

jialge

10/14/2008 9:55:00 AM

0

Hello Ashutosh,

May I ask why you would need to directly use the SEH and not through the
C++/C# implementation? Given a specific scenario, I may be able to help to
find out some solutions. At the moment, I do not know a way to use SHE
directly, but I will do my best to perform researches and help you with the
issue.

Thanks,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Ashutosh

10/15/2008 3:30:00 PM

0

Hi,
Thanks for the reply!!

I am not having any issues. It's just that if I could use it my life
(and the code) will be much more simple...if I use the
EXCEPTION_CONTINUE_EXECUTION feature...

Thanks & Regards,
Ashutosh

Jialiang Ge [MSFT] wrote:
> Hello Ashutosh,
>
> May I ask why you would need to directly use the SEH and not through the
> C++/C# implementation? Given a specific scenario, I may be able to help to
> find out some solutions. At the moment, I do not know a way to use SHE
> directly, but I will do my best to perform researches and help you with the
> issue.
>
> Thanks,
> Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> =================================================
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> =================================================
>
>