473,394 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Nested exceptions example

Could anyone shows me a simple example of nested exceptions handling on
vb.net? Or any articles that explains this concept, since I am getting
difficulties to see when/how to use nested exceptions.

Regards,
Chris Leffer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
1 1763

Try
' open SQL connection here...
' execute stored proc

Try '<-- nested try block
' open file here
' write data to file
Catch Ex As Exception
' catch & handle any errors during file writing operation
Finally
' close file
End Try

Catch sqlEx as SqlException
' handle database errors
Catch Ex As Exception
' handle unexpected errors
Finally
' close SQL stuff
End Try
"Chris Leffer" <ch****@wank.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Could anyone shows me a simple example of nested exceptions handling on
vb.net? Or any articles that explains this concept, since I am getting
difficulties to see when/how to use nested exceptions.

Regards,
Chris Leffer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Peter Olcott | last post by:
http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html Why is C# 500% slower than C++ on Nested Loops ??? Will this problem be solved in...
4
by: ECathell | last post by:
I had read an article at one time that suggested a pattern to get around deeply nested if..then..else hell... Can anyone point me in that direction? select case statements wont work for me in...
77
by: Peter Olcott | last post by:
http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html The above link shows that C# is 450% slower on something as simple as a nested loop....
14
by: dcassar | last post by:
I have had a lively discussion with some coworkers and decided to get some general feedback on an issue that I could find very little guidance on. Why is it considered bad practice to define a...
4
by: Asfand Yar Qazi | last post by:
Consider the following operation: class C { public: ... virtual void override_me() = 0; struct AnException : public std::runtime_error { AnException(const std::string& arg)
1
by: ChrisW | last post by:
Just out of interest, does anyone know what the behaviour of the following is supposed to be: <div style="width: 80%"> <div style="width: 600px"> <!--HTML code goes here --> </div>
1
by: usenet | last post by:
I wrote some sample code (see below) for nested exception throwing i.e. my catch blocks are throwing exceptions of their own (for simplicity I used standard exceptions). I am getting some...
5
by: Calvin Spealman | last post by:
On Wed, Aug 13, 2008 at 11:32 AM, Cousson, Benoit <b-cousson@ti.comwrote: There is no point of nested classes because nested classes _are not_ supported by python. They are simply an artifact of...
7
by: brasse | last post by:
Hello! I have been running in to some problems when using contextlib.nested(). My problem arises when using code similar to this: from __future__ import with_statement from contextlib...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.