Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2004

Tip: Looking for answers? Try searching our database.

STL: which functions can throw exceptions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bruno van Dooren - 28 Sep 2004 10:25 GMT
Hi,

i am using some STL containers in a library of mine.
how can i see which exceptions can occur when doing something
with those containers (adding an elemnt for example)

i have looked in the MSDN collection, but class members lists nothing, and
the specific functions also don't mention anything.

am i looking in the wrong place or doi have to find my way through the STL
sources?

kind regards,
   Bruno.
Tom Widmer - 28 Sep 2004 14:31 GMT
>Hi,
>
>i am using some STL containers in a library of mine.
>how can i see which exceptions can occur when doing something
>with those containers (adding an elemnt for example)

Generally anything that might allocate memory might throw
std::bad_alloc.

>i have looked in the MSDN collection, but class members lists nothing, and
>the specific functions also don't mention anything.

Generally the exceptions they throw depend on the exceptions that the
held types throw. If you have a vector<MyType> and the MyType copy
constructor throws, then lots of vector's methods may throw that
exception.

>am i looking in the wrong place or doi have to find my way through the STL
>sources?

There's a good .pdf on library exception safety here:

http://www.research.att.com/~bs/3rd_safe0.html

(or buy the book).

Tom

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.