Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: exception problem

Reply
Thread Tools

Re: exception problem

 
 
Chris Angelico
Guest
Posts: n/a
 
      06-26-2012
(You posted privately to me again; I hope you don't mind my responding
on-list as this appears to have been merely oversight.)

On Wed, Jun 27, 2012 at 5:25 AM, Charles Hixson
<(E-Mail Removed)> wrote:
> Only thing is, this whole mess started when I was trying to trace down and
> expected error. *(Which turned out to be "self.chunkLine(..." where self
> wasn't defined.) *It was running without ANY error being displayed. *Though
> as I look an outer loop is inclosed in a try:except:finally: *It still has
> an unlabelled except, because I don't remember what exception is thrown when
> a file reads an unintelligible character *(i.e., it isn't really a utf-8
> file). *Currently I've fixed all the files so that they're either utf-8or
> just ASCII, so currently it isn't getting triggered, but it's still there..
> *So that's probably the explanation. *I think I'll fix that now. *(I can, I
> guess, assume that any exception will be caught by except BasicException


That's the problem, your blanket try/except. Don't do it! It blinds
you. Same goes for catching Exception or BaseException. Catch what you
really need to catch, and reserve catch-all statements for special
cases where you don't have access to the console.

ChrisA
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Throw Exception Vs Throw New Exception Kerri ASP .Net 2 10-27-2003 02:13 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 3 06-26-2003 01:02 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 0 06-24-2003 12:46 PM



Advertisments