On 16/05/15 17:56, Jim Mooney Py3.4.3winXP wrote:

I can see I was marvelously unclear ;') Here is what I meant.

def make_error():
     raise ZeroDivisionError('Here I am')

def call_error():
     try:
         make_error()
     except:
         print("How do I get the 'Here I am' message to print in the calling
routine?")


call_error()
How do I get the 'Here I am' message to print in the calling routine?

And the remainder of Steven's reply showed you how, using the
args attribute of the error.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to