473,804 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

exceptions


Hi,

I've the following problem with try/exception.
I've a try block that will raise some exceptions.
I want the program to ignore this exceptions completely.
Is it possible?

Thanks in advance

Zunbeltz

--
Zunbeltz Izaola Azkona | wmbizazz at lg dot ehu
dotes
Materia Kondentsatuaren Fisika Saila |
Zientzia eta Teknologia Fakultatea | Phone: 34946015326
Euskal Herriko Unibertsitatea |
PK 644 | Fax: 34 944648500
48080 Bilbo (SPAIN) |
Jul 18 '05
26 2653
Alexander Schmolck <a.********@gmx .net> writes:
Scott David Daniels <Sc***********@ Acm.Org> writes:
Calvin Spealman wrote:
...
Have to admit tho, a continue feature might be useful. Some languages have
this, don't they? The thing is, Where exactly to continue? Should you retry
whatever raised the exception, continue just after it, at the beginning of
that line, or what?
See this older thread:
<http://groups.google.c om/groups?threadm= 3edd6118%241%40 nntp0.pdx.net>

Xerox's experience (in deliberately removing the "continue from
exception" language feature) I found very instructive.


Did this language support working interactively? If so I'd be pretty surprised
to hear that no one found it useful to be able to manually fix things and
continue execution; not being able to do so is presumably my number one gripe
with python [1] -- it annoys me no end if I need to start an expensive
computation from scratch because some trivial and easily fixable problem
occured towards the end of the computation (sometimes it is possible to
salvage stuff by hand by pickling things from the appropriate post-mortem
frame, but I'd *much* prefer being able to say: foo=some_value; resume).


I'd like this too. It might be quite hard to implement
non-disruptively but I haven't thought about it too hard. Would make
an excellent project for a master's thesis, IMHO.
Footnotes:
[1] Number 2 would be the stupid try: finally: idiom which also seems to
screw up tracebacks
?
(which has occasionally led me to get rid of them completely
while debugging -- surely not a good thinge). My other gripes
are again related to python's limitations for interactive
software development -- I rather like python, but I really wish
it did that better.


What do you mean here, specifically?

I find I can do interactive development in Python most of the time (I
do wish it was more possible with PyObjC, though).

Cheers,
mwh

--
I think perhaps we should have electoral collages and construct
our representatives entirely of little bits of cloth and papier
mache. -- Owen Dunn, ucam.chat, from his review of the year
Jul 18 '05 #21
John J. Lee wrote:
Peter Hansen <pe***@engcorp. com> writes:
Zunbeltz Izaola wrote:


[...]
But what I'm doing is not unittest.


Pardon: I don't know why I thought this was related to testing
code.


[...]

It couldn't be that you're obsessed with unit testing, of course
<wink>.


Perhaps that's it. Another viable theory is that I spend
so much time answering questions here that sometimes I fail
to read the requests carefully enough. Doubtless there
are other possibilities.

-Peter
Jul 18 '05 #22
Michael Hudson <mw*@python.net > writes:
Alexander Schmolck <a.********@gmx .net> writes:
it annoys me no end if I need to start an expensive computation from
scratch because some trivial and easily fixable problem occured towards the
end of the computation (sometimes it is possible to salvage stuff by hand
by pickling things from the appropriate post-mortem frame, but I'd *much*
prefer being able to say: foo=some_value; resume).


I'd like this too. It might be quite hard to implement
non-disruptively but I haven't thought about it too hard. Would make
an excellent project for a master's thesis, IMHO.
Footnotes:
[1] Number 2 would be the stupid try: finally: idiom which also seems to
screw up tracebacks


?


I verified that this doesn't happen with plain python -- ipython's traceback
pretty printing code however doesn't display the right line for frames where
the exception occured within try: finally:. I've now tracked it down to the
use of inspect.getinne rframes, the line numbers here are subtly different from
what traceback.extra ct_tb returns (last executed expression in frame vs. where
the error occured). Since I couldn't find something readymade, I'll submit
some patch to ipython that merges the functionality of the two functions.
(which has occasionally led me to get rid of them completely
while debugging -- surely not a good thinge). My other gripes
are again related to python's limitations for interactive
software development -- I rather like python, but I really wish
it did that better.


What do you mean here, specifically?


In no particular order:

- Interactively redefining modules or classes in a way that propogates
to other modules/preexisting instances is not exactly fun. One can often
get by by judicious use of reload, mutating classes [1] (got to be careful
to to avoid pickle failing with something along the lines of
"myModule.myCla ss is not of type myModule.myClas s")

- no images, i.e. you can't freeze and dump the state of the whole system

- it's not particularly easy or convenient to get an useful overview of the
variables in your "workspace" , e.g. memory consumption, narrowing down to
"interestin g" categories etc (I know that there is of course no general way
of doing that, but compare e.g. for matlab)

- pdb is uhm, well... suboptimal (also crashes on me from time to time, not
sure why)

- global variables in python are a painful in a number of ways that does
affect interactive development

- there is not much of a culture to make modules work properly for interactive
users -- things are often not reload-safe, export all sorts of crap, not
just their interface (so that 'from foo import *' likely will hose things up
-- this is slightly aggravated 'helpful' naming conventions such as
datetime.dateti me or StringIO.String IO). Finally I think some modules,
notably GUI toolkits won't work at all.

- the available IDEs I know of are clearly far from ideal. I'd venture the
uneducated guess that ipython+emacs is amongst the best offerings for
interactive development with python and it's really not that great -- e.g.
if you use the py-execute commands source level debugging no longer will
work since the temp file created by python-mode for execution will be gone
(you can of course hang on to it, which is actually what I wound up doing
but that's very risky -- you end up inadvertenly fixing temp-files rather
than the real thing. I guess it might help if there were some easy way to
exec(file) a string, but lie about were it came from (i.e. ``exec foo,
filename="bla.p y", startline=10)). In case anyone wonders that given my
misgivings about pdb I'm bothered about this -- well, one can easily set up
emacs/ipython to jump to right file and line when an error in your
interactive session occurs (and than walk up and down the traceback). This
is **very** useful, I have it activated pretty much all the time.

I find I can do interactive development in Python most of the time (I
do wish it was more possible with PyObjC, though).


I'm not saying it's impossible (I *always* run ipython in emacs, never python
in the commandline on a file, with the sole exception of regression test) but
kludging a workable interactive enviroment together needs, I think, a fair
amount of expertise and additional software (something like ipython+emacs) --
so I'd guess that most people primarily treat python as a really fast C
compiler (but I might be wrong), which is a pitty.

Also, whlilst python interactive offerings might be great when compared to
Java and C++( thankfully I haven't tried), it clearly falls far short of what
is in principle achievable and indeed has been often been achieved many, many
years ago (squeak, cmucl/sbcl+slime, matlab, j and plt scheme, to name just a
few all have things to offer for interactive work that a python user can only
dream of).
'as
Footnotes:

[1] Here are a few of the hacks I'm using, in case anyone might find them
useful -- or even better tell me about better alternatives (If someone has
cooked something reasoable for reloading modules, I'd love to hear about
it).

# to update all existing class instances

def updateClass(old Class, newClass):
"""Destrucitive ly modify the ``__dict__`` and ``__bases__`` contents of
`oldClass` to be the same as of `newClass`. This will have the effect that
`oldClass` will exhibit the same behavior as `newClass`.

Won't work for classes with ``__slots__`` (which are an abomination
anyway).
"""
assert type(oldClass) is type(newClass) is type #FIXME
#FIXME redefinition of magic methods
for name in dir(oldClass):
if not name.startswith ('__') or not name.endswith(' __'):
delattr(oldClas s, name)
for name in dir(newClass):
if not name.startswith ('__') or not name.endswith(' __'):
setattr(oldClas s, name, newClass.__dict __[name])
# XXX should check that this is absolutely correct
oldClass.__base s__ = newClass.__base s__
## easy pickling and unpickling for interactive use

def magicGlobals(le vel=1):
r"""Return the globals of the *caller*'s caller (default), or `level`
callers up."""
return inspect.getoute rframes(inspect .currentframe() )[1+level][0].f_globals

def __saveVarsHelpe r(filename, varNamesStr, outOf,extension ='.bpickle',**o pts):
filename = os.path.expandu ser(filename)
if outOf is None: outOf = magicGlobals(2)
if not varNamesStr or not isString(varNam esStr):
raise ValueError, "varNamesSt r must be a string!"
varnames = varNamesStr.spl it()
if not splitext(filena me)[1]: filename += extension
if opts.get("overw rite") == 0 and os.path.exists( filename):
raise RuntimeError("F ile already exists")
return filename, varnames, outOf

def saveVars(filena me, varNamesStr, outOf=None, **opts):
r"""Pickle name and value of all those variables in `outOf` (default: all
global variables (as seen from the caller)) that are named in
`varNamesStr` into a file called `filename` (if no extension is given,
'.bpickle' is appended). Overwrites file without asking, unless you
specify `overwrite=0`. Load again with `loadVars`.

Thus, to save the global variables ``bar``, ``foo`` and ``baz`` in the
file 'savedVars' do::

saveVars('saved Vars', 'bar foo baz')

"""
filename, varnames, outOf = __saveVarsHelpe r(
filename, varNamesStr, outOf, **opts)
print "pickling:\ n", "\n".join(isort (varnames))
try:
f = None
f = open(filename, "wb")

cPickle.dump(di ct(zip(varnames , [outOf, varnames])),
f, 1) # UGH: cPickle, unlike pickle doesn't accept bin=1
finally:
if f: f.close()

def loadVars(filena me, ask=True, into=None, only=None):
r"""Load variables pickled with `saveVars`.
Parameters:

- `ask`: If `True` then don't overwrite existing variables without
asking.
- `only`: A list to limit the variables to or `None`.
- `into`: The dictionary the variables should be loaded into (defaults
to global dictionary).
"""
filename = os.path.expandu ser(filename)
if into is None: into = magicGlobals()
varH = loadDict(filena me)
toUnpickle = only or varH.keys()
alreadyDefined = filter(into.has _key, toUnpickle)
if alreadyDefined and ask:
print "The following vars already exist; overwrite (yes/NO)?\n",\
"\n".join(alrea dyDefined)
if raw_input() != "yes":
toUnpickle = without(toUnpic kle, alreadyDefined)
if not toUnpickle:
print "nothing to unpickle"
return None
print "unpickling:\n" ,\
"\n".join(isort (list(toUnpickl e)))
for k in varH.keys():
if k not in toUnpickle:
del varH[k]
into.update(var H)
Jul 18 '05 #23
Alexander Schmolck <a.********@gmx .net> wrote:
[1] Here are a few of the hacks I'm using, in case anyone might
find them useful -- or even better tell me about better
alternatives (If someone has cooked something reasoable
for reloading modules, I'd love to hear about it).


I have already answered to you on one previous occasion, and told you
another time in this present thread. I've used this kind of trick in
wxPython. It's good for interactively developing widgets, without
re-starting your program.

Now here is a third try. :)

(
For the first time, see:
http://groups.google.com/groups?q=g:...ing.google.com
)

You can of course use a metaclass to make things a bit easier. Here is
a draft version.

#----- autoupdate.py
'''metaclass for auto-update classes'''
class __metaclass__(t ype):
# automatically keeps tracks of instances
def __new__(cls, class_name, bases, class_dict):
import inspect
module_name = class_dict['__module__']
instance_dict_n ame = '_%s__instances ' % class_name
# see if there is already an older class
import sys
old_instance_di ct = None
if sys.modules.has _key(module_nam e):
module = sys.modules[module_name]
if hasattr(module, class_name):
old_instance_di ct = getattr(
getattr(module, class_name),
instance_dict_n ame)
# add instance list
import weakref
class_dict[instance_dict_n ame] = weakref.WeakVal ueDictionary()
# override the __init__
if class_dict.has_ key('__init__') :
def new_init(self, *args, **kw):
instance_dict_n ame = '_%s__instances ' % (
self.__class__. __name__)
getattr(self.__ class__,
instance_dict_n ame)[id(self)] = self
self.__original _init__(*args, **kw)
class_dict['__original_ini t__'] = class_dict['__init__']
class_dict['__init__'] = new_init
else:
def new_init(self, *args, **kw):
instance_dict_n ame = '_%s__instances ' % (
self.__class__. __name__)
getattr(self.__ class__,
instance_dict_n ame)[id(self)] = self
class_dict['__init__'] = new_init
# build the class, with instance_dict
new_class = type.__new__(cl s, class_name, bases, class_dict)
# copy over the instance dictionary, and update __class__
if old_instance_di ct is not None:
for instance_id, instance in (
old_instance_di ct.iteritems()) :
getattr(new_cla ss,
instance_dict_n ame)[instance_id] = instance
instance.__clas s__ = new_class
# return new class
return new_class

#----- Spam.py
from autoupdate import __metaclass__
class Egg:
'''Put here your class code'''
# def print(self):
# print 'Hello World!'

#----- from your Python console
import Spam
x = Spam.Egg()
# ... edit your Spam.py file and change code for Spam.Egg class,
# e.g.: add a print() method to Spam.Egg by uncommenting
# the corresponding lines. Save the file.
reload(Spam)
x.print() # prints 'Hello World!'

---------------------

regards,

Hung Jung
Jul 18 '05 #24
hu********@yaho o.com (Hung Jung Lu) writes:
Alexander Schmolck <a.********@gmx .net> wrote:
[1] Here are a few of the hacks I'm using, in case anyone might
find them useful -- or even better tell me about better
alternatives (If someone has cooked something reasoable
for reloading modules, I'd love to hear about it).
I have already answered to you on one previous occasion,


Sorry, maybe I missed it (at the time I had no access to a reliable
newsserver, so many articles didn't show up).
and told you another time in this present thread.
Yep, I've guessed correctly that your mention of weakrefs alluded to a
technique along those lines -- I haven't finished my reply to your article yet
as I sunk quite a bit of time on debugging IPython yesterday.
I've used this kind of trick in wxPython. It's good for interactively
developing widgets, without re-starting your program.

Now here is a third try. :)


Thanks for your trying again, I've only had time for a glance but this looks
quite neat -- I notice that it has evolved a bit since your original posting
:)

So far I have shied away from a metaclass based solution, as I got by with the
simple hack I posted and this hack doesn't require modifications to source
code. Another reason was that metaclasses don't combine well, but since I
haven't ended up using metaclasses much so far that might not be a problem. So
thanks for posting this, it looks quite useful.

'as
Jul 18 '05 #25
hu********@yaho o.com (Hung Jung Lu) writes:
There are a few lessons learnt from younger programming languages,
like Io.
I'm a bit suprised we have to learn from IO given that at least on superficial
inspection, IO mostly seems to self as ruby is to smalltalk.
One lesson is that you really would like to avoid rigid statement syntax.
How do younger languages like IO make this point more forcefully than lisp,
smalltalk etc -- languages which have been around for decades?

I also suspect that the statement/expression distinction is beneficial at
least for inexperienced programmers (a declared target audience of python),
simply because it means that there are less ways to express the same thing and
nesting is limited -- in other words, I believe there is some trade off
involved.
In the example of the original topic of this thread, you cannot
intercept/override exception handling mechanism because the
try:...except:. .. block is not a function.
I don't think having try/except functions instead of statements provides a
sufficient solution. Apart from the fact that functions in themselves don't
provide an adequate control flow mechanism for exceptions, I don't want to
have to write my own error handling mechanisms in order to be able to deal
with some limited subset of errors raised in *my* code -- I want to be able to
deal with *all* errors in an interactive session, no matter where they were
raised and I don't want to have to rewrite (or slow down) *any* code in order
to do so.
Similar situations happen with issues regarding aspect-oriented programming.
In a language like Io, everything is a method that send message to an
object. Even If(...) statements are methods, as well as loops. The advantage
is you can intercept things at your heart's content.
It would allow some interception, but I don't think enough for my heart's
content because exceptions are completely different beasts from functions,
certainly in python (dynamically scoped ones, for starters).
In comparison, Python's exception handling is not interceptible, because
exception handling is hard-coded in syntax.
I don't think syntax is the sticking point here -- you could do some
additional, possibly useful, things if raise where, say, a method, but I can't
see how it would go anywhere near solving the problem.
It does not mean all hope is lost in Python. But it does mean that
instead of using the raise... statement in Python, you need to call a
function/method instead.
Such an approach doesn't really help much -- not only because I obviously
can't (and don't want to) rewrite all the code that might raise an exception
(which often isn't even python).
You can then intercept at that level: either by actually throwing an
exception, or by redirecting it to some user intervention funtion, or by
totally ignoring it (like using a 'pass' statement.)
Yes, but this is clearly insufficient.
Interactive programming with features like edit-and-continue still has
room to grow (most edit-and-continue features are not transactional,
that is, you cannot revert changes easily.) But in my opinion that's
an arena for prototype-based languages,
I don't see how prototype-based languages have a particular edge here --
Common lisp and Dylan, for example, support continuable conditions and can
hardly be called protype-based.
As for Python's interactive programming, I've done some experiment
before. It's not totally impossible. It's a bit uncomfortable. Python
does have module reload and weakref. When you use these tools
properly, you can achieve a high degree of non-stop programming.
I know -- I currently don't depend on weakref, but I use reload quite a lot
and I do all my programming in interactive sessions which sometimes last days.
It does not come as part of the language per-se. You need to build up some
tools yourself first.


This is one of the sticky points -- it requires some work and expertise (and
even then you are a long way off from e.g. smalltalk) and this in turn is
likely to mean that most python users won't get to experience the benefits of
interactive development (which in turn presumably means that libraries and
utilities often don't cater well for interactive use).

'as
Jul 18 '05 #26
Alexander Schmolck <a.********@gmx .net> wrote:
How do younger languages like IO make this point more forcefully than lisp,
smalltalk etc -- languages which have been around for decades?
Sorry, the last time I used Lisp was more than 20 years ago. I might
have to look it up again. I tend to rely on people that have more
experience. Io was based on experience from lots of other languages.
with some limited subset of errors raised in *my* code -- I want to be able to
deal with *all* errors in an interactive session, no matter where they were
raised and I don't want to have to rewrite (or slow down) *any* code in order
to do so.
One typical example mentioned in AOP is precisely exception handling.
If you look at Python's internal way of handling exception (read the
manual part on extending and embedding,) errors are typically
indicated by returning a NULL value. And there are a few functions to
call to set exceptions. That is, internally, Python exceptions are
implemented going through function mechanisms, any how. Now, if these
functions could be interceptible a la AOP, there you go with "catching
*all* errors."

Sure, I understand you don't want to write any code. You just want to
be the end user and enjoy the free ride. But someone has to write it,
at some level. What you are saying is that you don't want to be this
someone. All the nice interactive, edit-and-continue features in the
various languages are not born out of magic, they were written by
someone, right? :)
It would allow some interception, but I don't think enough for my heart's
content because exceptions are completely different beasts from functions,
certainly in python (dynamically scoped ones, for starters).
Exceptions in Python are implemented as (a) returning typically a NULL
value in Python functions at the C level, (b) setting exception
informations in global static variables, often via usage of some
functions like PyErr_SetString (). And in this regard, conceptually is
not different from AOP way of exception handling. And in this regard,
perfectly interceptible via function overrides, if it were not C but
some other language a la Io.

What I am saying is, it is totally possible to design a language where
exceptions are implemented using AOP approach, where each function
could return an additional implicit value (or a NULL value as in the
case of Python.) Now, the function (or "metafuncti on") in your AOP
code that handles the exception raising or catching can be overridden,
if you are using something like Io where all functions can be
overriden. That is, exception handling conceptually can be done via
functions. And in Microsoft C++, this is in fact the way how
exceptions are implemented: by including an extra return value. It's
just too bad that the end user cannot override internal C/assembler
functions. (There are products to do this type of overriding.
Profilers, memory leak detectors, debuggers, etc. are good examples...
in their "instrumentatio n" phase, they do AOP-ish insertion of
additional code and override the normal behavior.)

In short, for many language implementations , exceptions ultimately are
based on function features. They are not "completely different
beasts". Mostly everything ultimately comes down to plain-vanilla
function calls.
It does not mean all hope is lost in Python. But it does mean that
instead of using the raise... statement in Python, you need to call a
function/method instead.


Such an approach doesn't really help much -- not only because I obviously
can't (and don't want to) rewrite all the code that might raise an exception
(which often isn't even python).


I know, that's why I said "it does not mean all hope is lost". It
doesn't help much, but it helps a little.
Yes, but this is clearly insufficient.
Do you have any better idea? Short of stopping whining and starting to
re-write the Python interpreter yourself? I am sure you are totally
welcome to do so. :)
Interactive programming with features like edit-and-continue still has
room to grow (most edit-and-continue features are not transactional,
that is, you cannot revert changes easily.) But in my opinion that's
an arena for prototype-based languages,


I don't see how prototype-based languages have a particular edge here --


It does. You just don't see it. Most people can't see it. And I am not
telling the details. :) Smart people know what I am talking about. And
I'll just leave it at that. Sorry, can't say anymore. :)
I know -- I currently don't depend on weakref,
Weakref is the key, at least that was my experience. I urge you to
think again on why weakrefs are necessary. Whether to use metaclass,
AOP-ish approach, or brute force class changes, it's all just icing on
the cake. Weakref was the key, in my experience.
This is one of the sticky points -- it requires some work and expertise (and
even then you are a long way off from e.g. smalltalk) and this in turn is
likely to mean that most python users won't get to experience the benefits of
interactive development (which in turn presumably means that libraries and
utilities often don't cater well for interactive use).


I know. Python has been criticized from many directions. But you
either live with the workarounds, or stop whining and do the work
inside the interpreter so others can enjoy your work. :) In my
personal case, I choose the first alternative. The advantage is that I
can keep whining. I am almost sure that this would also be your
choice. :)

regards,

Hung Jung
Jul 18 '05 #27

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

Similar topics

16
5295
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...
21
2239
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
26
2920
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal belief is that checked exceptions should be required in .NET. I find that many others share the same views as I do. It is extremely frustrating to have to work around this with hacks like Abstract ADO.NET and CLRxLint (which still don't solve the...
9
2343
by: Gianni Mariani | last post by:
I'm involved in a new project and a new member on the team has voiced a strong opinion that we should utilize exceptions. The other members on the team indicate that they have either been burned with unmaintainable code (an so are now not using exceptions). My position is that "I can be convinced to use exceptions" and my experience was that it let to code that was (much) more difficult to debug. The team decided that we'd give...
6
2833
by: RepStat | last post by:
I've read that it is best not to use exceptions willy-nilly for stupid purposes as they can be a major performance hit if they are thrown. But is it a performance hit to use a try..catch..finally block, just in case there might be an exception? i.e. is it ok performance-wise to pepper pieces of code with try..catch..finally blocks that must be robust, in order that cleanup can be done correctly should there be an exception?
14
3483
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 public member with a return type that is derived from System.Exception? I understand the importance of having clean, concise code that follows widely-accepted patterns and practices, but in this case, I find it hard to blindly follow a standard...
8
2260
by: cat | last post by:
I had a long and heated discussion with other developers on my team on when it makes sense to throw an exception and when to use an alternate solution. The .NET documentation recommends that an exception should be thrown only in exceptional situations. It turned out that each of my colleagues had their own interpretation about what an "exceptional situation" may actually be. First of all, myself I’m against using exceptions extensively,...
1
2393
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I look for when evaluating someone's code is a try/catch block. While it isn't a perfect indicator, exception handling is one of the few things that quickly speak about the quality of code. Within seconds you might discover that the code author...
2
2970
by: Zytan | last post by:
I know that WebRequest.GetResponse can throw WebException from internet tutorials. However in the MSDN docs: http://msdn2.microsoft.com/en-us/library/system.net.webrequest.getresponse.aspx It only lists NotImplementedException in the Exceptions section. (Note that it does mention WebException in the Remarks section, but who knows if this is always the case for such classes, and thus perhaps they can't be trusted to always list these, and...
0
6505
RedSon
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...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10604
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, 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...
0
10354
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10359
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,...
0
9177
agi2029
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...
0
6870
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();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
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
2
3837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.