|
by: David Turner |
last post by:
Hi all
I noticed something interesting while testing some RAII concepts
ported from C++ in Python. I haven't managed to find any information
about it on the web, hence this post.
The problem is that when an exception is raised, the destruction of
locals appears to be deferred to program exit. Am I missing
something? Is this behaviour by design? If so, is there any reason
for it? The only rationale I can think of is to speed up...
|
by: dkcpub |
last post by:
I'm very new to Python, but I couldn't find anything in the docs or faq
about this. And I fished around in the IDLE menus but didn't see anything.
Is there a tool that can determine all the exceptions that can be raised
in a Python function, or in any of the functions it calls, etc.?
/Dan
|
by: Martin Smith |
last post by:
If a class has no need for any specific clean up code in a particular catch block is there any benefit to catching and rethrowing exceptions, rather than just letting the original exception bubble up to the calling function
If so what?
|
by: Chris Newcombe |
last post by:
Please could someone on the VC++ 7.0 compiler team (note; not 7.1)
tell me if this code is handled 'correctly' (i.e. as the original
poster suggests) in all cases?
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=89ed5u%248ck%40library1.airnews.net
(Incase the URL doesn't make it I've copied it below.)
I have a situation where I really need this technique. But the fact
that Dave Abrahams wasn't sure about it very much worries...
|
by: Lasse Vågsæther Karlsen |
last post by:
If I got the following code:
try
{
// something that might throw an exception
}
catch (Exception ex)
{
// Log contents of ex here
throw;
|
|
by: Steven T. Hatton |
last post by:
I haven't thought about rethrowing an exception in a long time, and tried to
do it the wrong way. Now I'm curious about /why/ it's wrong. My
expectation was that the exception instance would simply be passed up the
call stack as the same object. It would therefore behave polymorphically.
Is the behavior shown below compiler-specific? I'm using gcc 4.0.2.
In terms of what goes on at runtime, why does the `throw e' act as if I
threw a...
|
by: =?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?= |
last post by:
In my opinion rethrowing exceptions without providing anny extra information
is a totall waste
Examples :
in my opinion wrong :
A:
Public sub DoSomeStuff()
Try
do it
|
by: valentin tihomirov |
last post by:
I do not understand something. A caught exception stack points to an
argument-free 'throw' in a catch block. Meantime, it is widely known that
these statements re-throw the original exceptions. I expected, therefore,
that the stack points to the original 'throw e' code line.
|
by: jerseycat10 |
last post by:
I am trying to overcome the following hurdle. We have several
exception types, derived from a "BaseException" type.
Lets say SpecialException inherits from BaseException.
Lets say a SpecialException is thrown, and handled by try/catch that
is catching "BaseException".
If I retry to throw this exception, I get a core dump.
|
by: RedSon |
last post by:
Chapter 3: What are the most common Exceptions and what do they mean?
As we saw in the last chapter, there isn't only the standard Exception, but you also get special exceptions like NullPointerException or ArrayIndexOutOfBoundsException. All of these extend the basic class Exception.
In general, you can sort Exceptions into two groups: Checked and unchecked Exceptions. Checked Exceptions are checked by the compiler at compilation time. Most...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|